diff --git a/README.md b/README.md index 6adf4e9..09bd892 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,12 @@ For information on Siddhi and i * Versions 2.x and lower with group id `org.wso2.extension.siddhi.` from here. ## Latest API Docs -Latest API Docs is 3.0.1. +Latest API Docs is 3.0.2. ## Features -* rabbitmq *(Sink)*

The rabbitmq sink pushes the events into a rabbitmq broker using the AMQP protocol

-* rabbitmq *(Source)*

The rabbitmq source receives the events from the rabbitmq broker via the AMQP protocol.

+* rabbitmq *(Sink)*

The rabbitmq sink pushes the events into a rabbitmq broker using the AMQP protocol

+* rabbitmq *(Source)*

The rabbitmq source receives the events from the rabbitmq broker via the AMQP protocol.

## Dependencies There are no other dependencies needed for this extension. diff --git a/docs/api/3.0.2.md b/docs/api/3.0.2.md new file mode 100644 index 0000000..12bf956 --- /dev/null +++ b/docs/api/3.0.2.md @@ -0,0 +1,425 @@ +# API Docs - v3.0.2 + +!!! Info "Tested Siddhi Core version: *5.1.5*" + It could also support other Siddhi Core minor versions. + +## Sink + +### rabbitmq *(Sink)* +

+

The rabbitmq sink pushes the events into a rabbitmq broker using the AMQP protocol

+

+Syntax + +``` +@sink(type="rabbitmq", uri="", heartbeat="", exchange.name="", exchange.type="", exchange.durable.enabled="", exchange.autodelete.enabled="", delivery.mode="", content.type="", content.encoding="", priority="", correlation.id="", reply.to="", expiration="", message.id="", timestamp="", type="", user.id="", app.id="", routing.key="", headers="", tls.enabled="", tls.truststore.path="", tls.truststore.password="", tls.truststore.type="", tls.version="", @map(...))) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
uri

The URI that used to connect to an AMQP server. If no URI is specified, an error is logged in the CLI.e.g.,
amqp://guest:guest, amqp://guest:guest@localhost:5672

STRINGNoNo
heartbeat

The period of time (in seconds) after which the peer TCP connection should be considered unreachable (down) by RabbitMQ and client libraries.

60INTYesNo
exchange.name

The name of the exchange that decides what to do with a message it sends.If the exchange.name already exists in the RabbitMQ server, then the system uses that exchange.name instead of redeclaring.

STRINGNoYes
exchange.type

The type of the exchange.name. The exchange types available are direct, fanout, topic and headers. For a detailed description of each type, see [RabbitMQ - AMQP Concepts](https://www.rabbitmq.com/tutorials/amqp-concepts.html)

directSTRINGYesYes
exchange.durable.enabled

If this is set to true, the exchange remains declared even if the broker restarts.

falseBOOLYesYes
exchange.autodelete.enabled

If this is set to true, the exchange is automatically deleted when it is not used anymore.

falseBOOLYesYes
delivery.mode

This determines whether the connection should be persistent or not. The value must be either 1 or 2.If the delivery.mode = 1, then the connection is not persistent. If the delivery.mode = 2, then the connection is persistent.

1INTYesNo
content.type

The message content type. This should be the MIME content type.

nullSTRINGYesNo
content.encoding

The message content encoding. The value should be MIME content encoding.

nullSTRINGYesNo
priority

Specify a value within the range 0 to 9 in this parameter to indicate the message priority.

0INTYesYes
correlation.id

The message correlated to the current message. e.g., The request to which this message is a reply. When a request arrives, a message describing the task is pushed to the queue by the front end server. After that the frontend server blocks to wait for a response message with the same correlation ID. A pool of worker machines listen on queue, and one of them picks up the task, performs it, and returns the result as message. Once a message with right correlation ID arrives, thefront end server continues to return the response to the caller.

nullSTRINGYesYes
reply.to

This is an anonymous exclusive callback queue. When the RabbitMQ receives a message with the reply.to property, it sends the response to the mentioned queue. This is commonly used to name a reply queue (or any other identifier that helps a consumer application to direct its response).

nullSTRINGYesNo
expiration

The expiration time after which the message is deleted. The value of the expiration field describes the TTL (Time To Live) period in milliseconds.

nullSTRINGYesNo
message.id

The message identifier. If applications need to identify messages, it is recommended that they use this attribute instead of putting it into the message payload.

nullSTRINGYesYes
timestamp

Timestamp of the moment when the message was sent. If you do not specify a value for this parameter, the system automatically generates the current date and time as the timestamp value. The format of the timestamp value is dd/mm/yyyy.

current timestampSTRINGYesNo
type

The type of the message. e.g., The type of the event or the command represented by the message.

nullSTRINGYesNo
user.id

The user ID specified here is verified by RabbitMQ against theuser name of the actual connection. This is an optional parameter.

nullSTRINGYesNo
app.id

The identifier of the application that produced the message.

nullSTRINGYesNo
routing.key

The key based on which the excahnge determines how to route the message to the queue. The routing key is similar to an address for the message.

emptySTRINGYesYes
headers

The headers of the message. The attributes used for routing are taken from the this paremeter. A message is considered matching if the value of the header equals the value specified upon binding.

nullSTRINGYesYes
tls.enabled

This parameter specifies whether an encrypted communication channel should be established or not. When this parameter is set to true, the tls.truststore.path and tls.truststore.password parameters are initialized.

falseBOOLYesNo
tls.truststore.path

The file path to the location of the truststore of the client that sends the RabbitMQ events via the AMQP protocol. A custom client-truststore can be specified if required. If a custom truststore is not specified, then the system uses the default client-trustore in the ${carbon.home}/resources/security directory.

${carbon.home}/resources/security/client-truststore.jksSTRINGYesNo
tls.truststore.password

The password for the client-truststore. A custom password can be specified if required. If no custom password is specified, then the system uses wso2carbon as the default password.

wso2carbonSTRINGYesNo
tls.truststore.type

The type of the truststore.

JKSSTRINGYesNo
tls.version

The version of the tls/ssl.

SSLSTRINGYesNo
+ +Examples +EXAMPLE 1 +``` +@App:name('TestExecutionPlan') +define stream FooStream (symbol string, price float, volume long); +@info(name = 'query1') +@sink(type ='rabbitmq', +uri = 'amqp://guest:guest@localhost:5672', +exchange.name = 'direct', +routing.key= 'direct', +@map(type='xml')) +Define stream BarStream (symbol string, price float, volume long); +from FooStream select symbol, price, volume insert into BarStream; + +``` +

+

This query publishes events to the direct exchange with the direct exchange type and the directTest routing key.

+

+## Source + +### rabbitmq *(Source)* +

+

The rabbitmq source receives the events from the rabbitmq broker via the AMQP protocol.

+

+Syntax + +``` +@source(type="rabbitmq", uri="", heartbeat="", exchange.name="", exchange.type="", exchange.durable.enabled="", exchange.autodelete.enabled="", routing.key="", headers="", queue.name="", queue.durable.enabled="", queue.exclusive.enabled="", queue.autodelete.enabled="", tls.enabled="", tls.truststore.path="", tls.truststore.password="", tls.truststore.type="", tls.version="", @map(...))) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
uri

The URI that is used to connect to an AMQP server. If no URI is specified,an error is logged in the CLI.e.g.,
amqp://guest:guest,
amqp://guest:guest@localhost:5672

STRINGNoNo
heartbeat

The period of time (in seconds) after which the peer TCP connection should be considered unreachable (down) by RabbitMQ and client libraries.

60INTYesNo
exchange.name

The name of the exchange that decides what to do with a message it receives.If the exchange.name already exists in the RabbitMQ server, then the system uses that exchange.name instead of redeclaring.

STRINGNoNo
exchange.type

The type of the exchange name. The exchange types available are direct, fanout, topic and headers. For a detailed description of each type, see [RabbitMQ - AMQP Concepts](https://www.rabbitmq.com/tutorials/amqp-concepts.html).

directSTRINGYesNo
exchange.durable.enabled

If this is set to true, the exchange remains declared even if the broker restarts.

falseBOOLYesNo
exchange.autodelete.enabled

If this is set to true, the exchange is automatically deleted when it is not used anymore.

falseBOOLYesNo
routing.key

The key based on which the exchange determines how to route the message to queues. The routing key is like an address for the message. The routing.key must be initialized when the value for the exchange.type parameter is direct or topic.

emptySTRINGYesNo
headers

The headers of the message. The attributes used for routing are taken from the this paremeter. A message is considered matching if the value of the header equals the value specified upon binding.

nullSTRINGYesNo
queue.name

A queue is a buffer that stores messages. If the queue name already exists in the RabbitMQ server, then the system usees that queue name instead of redeclaring it. If no value is specified for this parameter, the system uses the unique queue name that is automatically generated by the RabbitMQ server.

system generated queue nameSTRINGYesNo
queue.durable.enabled

If this parameter is set to true, the queue remains declared even if the broker restarts

falseBOOLYesNo
queue.exclusive.enabled

If this parameter is set to true, the queue is exclusive for the current connection. If it is set to false, it is also consumable by other connections.

falseBOOLYesNo
queue.autodelete.enabled

If this parameter is set to true, the queue is automatically deleted when it is not used anymore.

falseBOOLYesNo
tls.enabled

This parameter specifies whether an encrypted communication channel should be established or not. When this parameter is set to true, the tls.truststore.path and tls.truststore.password parameters are initialized.

falseBOOLYesNo
tls.truststore.path

The file path to the location of the truststore of the client that receives the RabbitMQ events via the AMQP protocol. A custom client-truststore can be specified if required. If a custom truststore is not specified, then the system uses the default client-trustore in the ${carbon.home}/resources/security directory.

${carbon.home}/resources/security/client-truststore.jksSTRINGYesNo
tls.truststore.password

The password for the client-truststore. A custom password can be specified if required. If no custom password is specified, then the system uses wso2carbon as the default password.

wso2carbonSTRINGYesNo
tls.truststore.type

The type of the truststore.

JKSSTRINGYesNo
tls.version

The version of the tls/ssl.

SSLSTRINGYesNo
+ +Examples +EXAMPLE 1 +``` +@App:name('TestExecutionPlan') +define stream FooStream (symbol string, price float, volume long); +@info(name = 'query1') +@source(type ='rabbitmq', +uri = 'amqp://guest:guest@localhost:5672', +exchange.name = 'direct', +routing.key= 'direct', +@map(type='xml')) +Define stream BarStream (symbol string, price float, volume long); +from FooStream select symbol, price, volume insert into BarStream; + +``` +

+

This query receives events from the direct exchange with the directexchange type, and the directTest routing key.

+

diff --git a/docs/api/latest.md b/docs/api/latest.md index 9df9a25..12bf956 100644 --- a/docs/api/latest.md +++ b/docs/api/latest.md @@ -1,6 +1,6 @@ -# API Docs - v3.0.1 +# API Docs - v3.0.2 -!!! Info "Tested Siddhi Core version: *5.1.2*" +!!! Info "Tested Siddhi Core version: *5.1.5*" It could also support other Siddhi Core minor versions. ## Sink diff --git a/docs/index.md b/docs/index.md index 6adf4e9..09bd892 100644 --- a/docs/index.md +++ b/docs/index.md @@ -17,12 +17,12 @@ For information on Siddhi and i * Versions 2.x and lower with group id `org.wso2.extension.siddhi.` from here. ## Latest API Docs -Latest API Docs is 3.0.1. +Latest API Docs is 3.0.2. ## Features -* rabbitmq *(Sink)*

The rabbitmq sink pushes the events into a rabbitmq broker using the AMQP protocol

-* rabbitmq *(Source)*

The rabbitmq source receives the events from the rabbitmq broker via the AMQP protocol.

+* rabbitmq *(Sink)*

The rabbitmq sink pushes the events into a rabbitmq broker using the AMQP protocol

+* rabbitmq *(Source)*

The rabbitmq source receives the events from the rabbitmq broker via the AMQP protocol.

## Dependencies There are no other dependencies needed for this extension. diff --git a/mkdocs.yml b/mkdocs.yml index 6f60a45..c3162b1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -34,6 +34,7 @@ pages: - Information: index.md - API Docs: - latest: api/latest.md + - 3.0.2: api/3.0.2.md - 3.0.1: api/3.0.1.md - 3.0.0: api/3.0.0.md - 2.0.0: api/2.0.0.md