Skip to content

Commit ec33bb1

Browse files
committed
Now using configurable topic
1 parent 79d68c4 commit ec33bb1

File tree

5 files changed

+9
-22
lines changed

5 files changed

+9
-22
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ infrastructure, it expects following environment variables to be present when st
4040
* ``ELASTICIO_AMQP_URI`` something like ``amqp://foo:bar@server``
4141
* ``ELASTICIO_MESSAGE_CRYPTO_IV`` vector for symmetric encryption
4242
* ``ELASTICIO_MESSAGE_CRYPTO_PASSWORD`` password for symmetric encryption
43-
* ``ELASTICIO_TASK_ID`` ID of the currently running task, used to construct name for exchange
4443
* ``ELASTICIO_USER_ID`` ID of the current user, used to construct name of the exchange
4544

4645

component.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
"publish": {
1616
"title": "Publish",
1717
"main": "./lib/actions/publish.js",
18+
"fields": {
19+
"topic": {
20+
"label": "Exchange",
21+
"viewClass": "TextFieldView",
22+
"required": true,
23+
"placeholder": "up_to_200_symbols"
24+
}
25+
},
1826
"metadata": {
1927
}
2028
}

lib/actions/publish.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports.process = processAction;
1616
function processAction(msg, cfg) {
1717
console.log('Action started');
1818
const amqpURI = cfg.amqpURI;
19-
const amqpExchange = `pubsub_${process.env.ELASTICIO_TASK_ID}_${process.env.ELASTICIO_USER_ID}`;
19+
const amqpExchange = `pubsub_${process.env.ELASTICIO_USER_ID}_${cfg.topc}`;
2020
co(function*() {
2121
if (!conn) {
2222
console.log('Connecting to amqpURI=%s', amqpURI);

lib/schemas/publish.in.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

lib/schemas/publish.out.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)