@@ -28,7 +28,7 @@ Development is done on [Cache-Tort-Git UDL fork](https://github.com/MakarovS96/c
28
28
29
29
## Usage
30
30
31
- Check `RabbitMQ .Utils` for sample code. The main class is `isc.rabbitmq.API`. It has the following methods.
31
+ Check `isc.rabbitmq .Utils` for sample code. The main class is `isc.rabbitmq.API`. It has the following methods.
32
32
33
33
### Methods
34
34
@@ -46,7 +46,7 @@ Check `RabbitMQ.Utils` for sample code. The main class is `isc.rabbitmq.API`. It
46
46
| Argument | Java type | InterSystems type | Value | Required | Description |
47
47
|---------------|------------------|---------------------|---------------|-----------------------------------------------|-----------------------------------------|
48
48
| gateway | - | %Net.Remote.Gateway | - | Yes | Connection to Java Gateway |
49
- | host | String | %String | localhost | Yes | Address of RabbitMQ server |
49
+ | host | String | %String | localhost | Yes | Address of RabbitMQ server or `amqp:\\` connection string |
50
50
| port | int | %Integer | -1 | Yes | RabbitMQ listener port |
51
51
| user | String | %String | guest | Yes | Username |
52
52
| pass | String | %String | guest | Yes | Password |
@@ -111,19 +111,20 @@ Assuming you already have `api` object, sending messages can be done by one of
111
111
112
112
#### Sending messages to default queue
113
113
114
- Default queue is a queue specified during creation of the `api` object. To send a message just call
114
+ Default queue is a queue specified during creation of the `api` object. To send a message just call `sendMessage` or `sendMessageId`:
115
115
116
116
```
117
117
#Dim api As isc.rabbitmq.API
118
118
#Dim msg As %GlobalBinaryStream
119
- Do api.sendMessage(msg, "correlationId", "messageId " _ $zdt($zts,3,1,3))
119
+ Do api.sendMessage(msg)
120
+ Do api.sendMessageId(msg, "correlationId", "messageId " _ $zdt($zts,3,1,3))
120
121
```
121
122
122
123
Where `stream` is a message body. You can either provide both `messageId` and `correlationId` or non of them.
123
124
124
125
#### Sending messages to specified queue
125
126
126
- Everything is the same as above, except you call `sendMessageToQueue` method and the first argument is the name of the queue.
127
+ Everything is the same as above, except you call `sendMessageToQueue` \ `sendMessageToQueueId` method and the first argument is the name of the queue.
127
128
128
129
### Reading messages
129
130
0 commit comments