Listener -
rabbitmq
: Listener
Ballerina RabbitMQ Message Listener. Provides a listener to consume messages from the RabbitMQ server.
Constructor
__init
(ConnectionConfiguration | Connection connectionOrConnectionConfig, int? prefetchCount, int? prefetchSize)
- connectionOrConnectionConfig ConnectionConfiguration | Connection
-
A
rabbitmq:Connection
object or the connection configurations.
- prefetchCount int? ()
-
Maximum number of messages that the server will deliver. Give the value as 0 if unlimited. Unless explicitly given, this value is 10 by default.
- prefetchSize int? ()
-
Maximum amount of content (measured in octets) that the server will deliver and 0 if unlimited
Methods
rabbitmq:Listener
endpoint.
rabbitmq:Channel
, which initializes this rabbitmq:Listener
.
LifeCycle Methods
Methods
rabbitmq:Listener
endpoint.
Parameters
- s service
-
Type descriptor of the service
-
Return Type
(error?) ()
or else arabbitmq:Error
upon failure to detach the service
-
Return Type
(error?) ()
or else arabbitmq:Error
upon failure to close theChannelListener
-
Return Type
(error?) ()
or else arabbitmq:Error
upon failure to close ChannelListener.
rabbitmq:Channel
, which initializes this rabbitmq:Listener
.
-
Return Type
(Channel) A
rabbitmq:Channel
object or else arabbitmq:Error
if an I/O problem is encountered.
LifeCycle Methods
rabbitmq:Listener
endpoint.
Parameters
- s service
-
Type descriptor of the service
- name string? (default ())
-
Name of the service
-
Return Type
(error?) ()
or else arabbitmq:Error
upon failure to register the service