Skip to content

Commit b808995

Browse files
authored
Update README.md
Standardisation of the document.
1 parent 26c4fa3 commit b808995

File tree

1 file changed

+38
-45
lines changed

1 file changed

+38
-45
lines changed

README.md

Lines changed: 38 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,65 @@
11
# amqp-component [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]
2-
> Pub/Sub Component for async communication with queues and topics
32

4-
# amqp-component
5-
PubSub component for the [elastic.io platform](http://www.elastic.io "elastic.io platform")
3+
## Description
64

7-
If you plan to **deploy it into [elastic.io platform](http://www.elastic.io "elastic.io platform") you must follow sets of instructions to succseed**.
5+
A component designed to talk to Advanced Message Queuing Protocol,
6+
(**AMQP**) APIs. AMQP is an open standard for passing business messages
7+
between applications or organisations (see [amqp.org](https://www.amqp.org) for more).
88

9-
## Before you Begin
9+
AMQP component establishes an asynchronous communications with queues and topics
10+
to publish or consume records.
1011

11-
Before you can deploy any code into elastic.io **you must be a registered elastic.io platform user**. Please see our home page at [http://www.elastic.io](http://www.elastic.io) to learn how.
12+
## How works
1213

13-
We will use git and SSH public key authentication to upload your component code, therefore you must **[upload your SSH Key](http://docs.elastic.io/docs/ssh-key)**.
14+
The consumer will register a non-exclusive non-durable queue with `autodelete=true` and
15+
without any dead-letter. Name of the queue will be dynamically generated based on
16+
the `USER_ID`, `FLOW_ID` prefixed with `eio_consumer_`. This
17+
queue will be bound to the exchange with specified bound key or multiple bound
18+
keys that are specified in one string separated by commas.
1419

15-
If you fail to upload you SSH Key you will get **permission denied** error during the deployment.
20+
## Requirements
1621

17-
## Getting Started
22+
### Environment variables
1823

19-
After registration and uploading of your SSH Key you can proceed to deploy it into our system. At this stage we suggest you to:
20-
* [Create a team](http://docs.elastic.io/docs/teams) to work on your new component. This is not required but will be automatically created using random naming by our system so we suggest you name your team accordingly.
21-
* [Create a repository](http://docs.elastic.io/docs/component-repositories) where your new component is going to *reside* inside the team that you have just created.
22-
23-
Now as you have a team name and component repository name you can add a new git remote where code shall be pushed to. It is usually displayed on the empty repository page:
24+
This component will automatically encrypt data that is sent to the queue when following
25+
environment variables are set:
2426

25-
```bash
26-
$ git remote add elasticio [email protected]:your-repository.git
27-
```
27+
* `ELASTICIO_MESSAGE_CRYPTO_IV` - vector for symmetric encryption
28+
* `ELASTICIO_MESSAGE_CRYPTO_PASSWORD` - password for symmetric encryption
2829

29-
Obviously the naming of your team and repository is entirely upto you and if you do not put any corresponding naming our system will auto generate it for you but the naming might not entirely correspond to your project requirements.
30-
Now we are ready to push it:
30+
These variables are by default available in the platform environment.
31+
Data will be encrypted using symmetric `AES-256` encryption.
3132

32-
```bash
33-
$ git push elasticio master
34-
```
3533

36-
## How consumer works
34+
## Credentials
3735

38-
Consumer will register a non-exclusive non-durable queue with autodelete=true without
39-
any dead-letter. Name of the queue will be dynamically
40-
generated based on the user ID, TASK ID prefixed with ``eio_consumer_``.
41-
This queue will be bound to the exchange with specified bound key or multiple
42-
bound keys that are specified in one string separated by commas.
36+
This component expects user to provide a AMQP URL, username and password should
37+
be embedded as part of the URL, for example `amqp://foo:bar@server`. You can
38+
also use URL syntax to provide further parameters and any other options
39+
(e.g. `vHost` or port).
4340

44-
## Authentication
41+
## Triggers
4542

46-
This component exects user to provide a AMQP URI, username and password should be embedded
47-
as part of the URI, for example ``amqp://foo:bar@server``. You can also use URI syntax
48-
to parametrize any other options (e.g. vHost or port)
43+
### Consume
4944

50-
## Encryption
45+
Will consume the incoming message object that contains `body` with the payload.
46+
If the exchange doesn't exist it will be created on start.
5147

52-
This component will automatically encrypt data that is sent to the queue when following
53-
environment variables are set:
48+
Optionally you can use `#` or `*` to wildcard. For more information check the
49+
tutorial provided at the [RabbitMQ site](http://www.rabbitmq.com/tutorials/tutorial-five-javascript.html).
5450

55-
* ``ELASTICIO_MESSAGE_CRYPTO_IV`` vector for symmetric encryption
56-
* ``ELASTICIO_MESSAGE_CRYPTO_PASSWORD`` password for symmetric encryption
51+
## Actions
5752

58-
These variables are by default available in elastic.io environment.
59-
Data will be encrypted using symetrical AES-256 encryption.
53+
### Publish
6054

55+
Will publish the messages into an exchange. This exchange will be created on
56+
start if it doesn't exists.
6157

62-
## Known issues
58+
## Known limitations
6359

6460
Following limitations of the component are known:
65-
* You can not publish to the default exchange. Not a huge limitation can be easily fixed
66-
but IMHO makes no sense now.
67-
* All exchanges you publish to are by default 'topic' exchanges - not a big limitation
68-
either, but with topic exchanges you can emulate direct and fanout exchanges
69-
so is't a sensible default so far.
61+
* You can not publish to the default exchange.
62+
* All published exchanges are `topic` exchanges by default. However, with the `topic` exchanges one can emulate `direct` and `fanout` exchanges.
7063

7164

7265
## License

0 commit comments

Comments
 (0)