Official Content

The MessageBroker External Object is under the GeneXusMessagingMessageBroker module and allows you to send and process messages of a Message Broker using the Message Broker API.

image_2022103151934_1_png

Methods 

SendMessage

Send a message to a message broker.

Return value   boolean
Parameters     Message:Message, options:Varchar, ErrorMessages:GeneXus.Common.Messages

In Azure Service Bus, the options can be left empty.

SendMessages

Send messages to the message broker.

Return value   boolean
Parameters     Message:Message (Collection), options:Varchar, ErrorMessages:GeneXus.Common.Messages

In Azure Service Bus, the options can be left empty.

ReceiveMessages

Retrieve messages from a message broker using options.

Return value    Message:Message (Collection)
Parameters     options:Varchar, ErrorMessages:GeneXus.Common.Messages, success: Boolean

Depending on the Message Broker provider used, the options parameter should be a JSON string formatted using the SDT defined for that purpose in the provider's module.
In Azure Service Bus, the options parameter has to be a JSON string of ReceiveMessageOptions SDT.

ReceiveMessage

Retrieve a message from a message broker using options.

Return value    Message:Message 
Parameters     options:Varchar, ErrorMessages:GeneXus.Common.Messages, success: Boolean

Depending on the Message Broker provider used, the options parameter should be a JSON string formatted using the SDT defined for that purpose in the provider's module.
In Azure Service Bus, the options parameter has to be a JSON string of ReceiveMessageOptions SDT.

ConsumeMessage

Consume / settle a message from a message broker using options.

Return value    success:Boolean
Parameters     Message:Message, options:Varchar, ErrorMessages:GeneXus.Common.Messages

Depending on the Message Broker provider used, the options parameter should be a JSON string formatted using the SDT defined for that purpose in the provider's module.
In Azure Service Bus, the options parameter has to be a JSON string of ConsumeMessageOptions SDT

ScheduleMessage

Schedules a message to appear on Message Broker at a later time.

Return value    handleId:Numeric (18)
Parameters     Message:Message, options:Varchar, ErrorMessages:GeneXus.Common.Messages

Depending on the Message Broker provider used, the options parameter should be a JSON string formatted using the SDT defined for that purpose in the provider's module.
In Azure Service Bus, the options parameter has to be a JSON string of ScheduleMessageOptions SDT

CancelSchedule

Cancels a message that was scheduled.

Return value    handleId:Numeric (18)
Parameters     Message:Message

In Azure Service Bus, the handleId is the SequenceNumber of the message. See here for more information.

Dispose

Dispose all the resources.

Availability

This feature is available since GeneXus 18 upgrade 1.

 

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant