Skip to content

Commit 626d31b

Browse files
committed
Let user configure exchange name fully
1 parent ec33bb1 commit 626d31b

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,30 @@ $ git push elasticio master
3535

3636
## Authentication
3737

38-
This component is using the internal RabbitMQ instance that is available as part of elastic.io
39-
infrastructure, it expects following environment variables to be present when started:
40-
* ``ELASTICIO_AMQP_URI`` something like ``amqp://foo:bar@server``
38+
This component exects user to provide a AMQP URI, username and password should be embedded
39+
as part of the URI, for example ``amqp://foo:bar@server``. You can also use URI syntax
40+
to parametrize any other options (e.g. vHost or port)
41+
42+
## Encryption
43+
44+
This component will automatically encrypt data that is sent to the queue when following
45+
environment variables are set:
46+
4147
* ``ELASTICIO_MESSAGE_CRYPTO_IV`` vector for symmetric encryption
4248
* ``ELASTICIO_MESSAGE_CRYPTO_PASSWORD`` password for symmetric encryption
43-
* ``ELASTICIO_USER_ID`` ID of the current user, used to construct name of the exchange
4449

45-
50+
These variables are by default available in elastic.io environment.
51+
Data will be encrypted using symetrical AES-256 encryption.
52+
53+
4654
## Known issues
4755

48-
No known issues are there yet.
56+
Following limitations of the component are known:
57+
* You can not publish to the default exchange. Not a huge limitation can be easily fixed
58+
but IMHO makes no sense now.
59+
* All exchanges you publish to are by default 'topic' exchanges - not a big limitation
60+
either, but with topic exchanges you can emulate direct and fanout exchanges
61+
so is't a sensible default so far.
4962

5063

5164
## License

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_USER_ID}_${cfg.topc}`;
19+
const amqpExchange = cfg.topc;
2020
co(function*() {
2121
if (!conn) {
2222
console.log('Connecting to amqpURI=%s', amqpURI);

0 commit comments

Comments
 (0)