You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** @internal In-progress delivery being assembled from frames. */
21
27
delivery?: AMQPMessage
28
+
/** @internal In-progress basicGet response being assembled. */
22
29
getMessage?: AMQPMessage
30
+
/** @internal In-progress returned message being assembled. */
23
31
returned?: AMQPMessage
32
+
/** Callback for channel-level errors. */
24
33
onerror: (reason: string)=>void
25
34
/**
26
35
* @param connection - The connection this channel belongs to
@@ -117,29 +126,20 @@ export class AMQPChannel {
117
126
}
118
127
119
128
/**
120
-
* Consume from a queue. Messages will be delivered asynchronously.
121
-
* @param queue - name of the queue to poll
122
-
* @param param
123
-
* @param [param.tag=""] - tag of the consumer, will be server generated if left empty
124
-
* @param [param.noAck=true] - if messages are removed from the server upon delivery, or have to be acknowledged
125
-
* @param [param.exclusive=false] - if this can be the only consumer of the queue, will return an Error if there are other consumers to the queue already
126
-
* @param [param.args={}] - custom arguments
127
-
* @param {function(AMQPMessage) : void | Promise<void>} callback - will be called for each message delivered to this consumer
129
+
* Consume from a queue. Messages are delivered asynchronously to the callback.
130
+
* @param queue - name of the queue
131
+
* @param params - consumer options
132
+
* @param callback - called for each delivered message
128
133
*/
129
134
basicConsume(
130
135
queue: string,
131
136
params: ConsumeParams,
132
137
callback: (msg: AMQPMessage)=>void|Promise<void>,
133
138
): Promise<AMQPConsumer>
134
139
/**
135
-
* Consume from a queue. Messages will be delivered asynchronously through an AsyncGenerator at `consumer.messages`.
136
-
* @param queue - name of the queue to poll
137
-
* @param param
138
-
* @param [param.tag=""] - tag of the consumer, will be server generated if left empty
139
-
* @param [param.noAck=true] - if messages are removed from the server upon delivery, or have to be acknowledged
140
-
* @param [param.exclusive=false] - if this can be the only consumer of the queue, will return an Error if there are other consumers to the queue already
141
-
* @param [param.args={}] - custom arguments
142
-
* @return {AMQPGeneratorConsumer} - Consumer with an AsyncGenerator for messages at `consumer.messages`
140
+
* Consume from a queue via an async generator at `consumer.messages`.
/* * @param [param.tag=""] - tag of the consumer, will be server generated if left empty
991
-
* @param [param.noAck=true] - if messages are removed from the server upon delivery, or have to be acknowledged
992
-
* @param [param.exclusive=false] - if this can be the only consumer of the queue, will return an Error if there are other consumers to the queue already
993
-
* @param [param.args={}] - custom arguments */
994
-
995
990
exporttypeConsumeParams={
996
-
/**
997
-
* tag of the consumer, will be server generated if left empty
998
-
*/
991
+
/** Consumer tag. Server-generated if empty.
992
+
* @defaultValue `""` */
999
993
tag?: string
1000
-
/**
1001
-
* if messages are removed from the server upon delivery, or have to be acknowledged
1002
-
*/
994
+
/** If true, messages are auto-acknowledged on delivery.
995
+
* @defaultValue `true` */
1003
996
noAck?: boolean
1004
-
/**
1005
-
* if this can be the only consumer of the queue, will return an Error if there are other consumers to the queue already
1006
-
*/
997
+
/** Fail if other consumers already exist on the queue.
0 commit comments