Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

 

Class

Description

Inbound 

org.wso2.andes.kernel.disruptor.inbound.InboundEventManager

All inbound events (such as message arrival, subscription add/close events etc.) are handled through this class.

org.wso2.andes.kernel.disruptor.inbound.MessagePreProcessor

The incoming message goes through this processor first, where its message ID and destination data are populated to ensure the message order closest to the message arrival time.

org.wso2.andes.kernel.disruptor.inbound.ContentChunkHandler

This processor will take the message content chunks, convert them to the andes core chunk size and delegate the rest of the work to the MessageWriter.

org.wso2.andes.kernel.disruptor.inbound.MessageWriter

This processor will write the message metadata and content chunks to the storage database using a batch approach.

org.wso2.andes.kernel.disruptor.inbound.StateEventHandler

Upon saving the message to storage, this handler is triggered to notify a message received event, or to notify a message acknowledged event from the consumer.

org.wso2.andes.kernel.disruptor.inbound.InboundTransactionEvent

This event is used to communicate the transaction commit/rollback events from the publisher.

Outbound

org.wso2.andes.kernel.disruptor.delivery.DeliveryEventHandler

This processor is used to deliver the message to one/all of the active subscriptions (based on the message destination).

org.wso2.andes.kernel.MessageFlusher

This class is used to handover the message to the consumer after reading from the internal message buffer (readButUndeliveredMessages).

org.wso2.andes.kernel.slot.SlotDeliveryWorker

There are multiple slot delivery workers managed by the SlotDeliveryWorkerManager. These will read messages from the database after selecting a slot range from the coordinator. The messages are then pushed to the message flusher for delivery.

org.wso2.andes.kernel.slot.SlotManagerClusterMode

This is where the coordinator logic resides within WSO2 MB. All slots are managed and distributed through this class across the cluster.

AMQP

org.wso2.andes.server.AMQChannel

A channel is used for delivering and accepting messages to/from the broker. Each AMQP consumer/publisher has its own unique channel with a channel ID.

org.wso2.andes.amqp.QpidAndesBridge

This is used as the bridge between the Qpid messaging events and Andes events.

MQTT

org.dna.mqtt.wso2.AndesMQTTBridge

This is used as the bridge between the moquette messaging events and Andes events.

org.dna.mqtt.moquette.messaging.spi.impl.ProtocolProcessor

This handles all events coming through the moquette disruptor (such as subscriber-connect, pub-acks etc.) and connects to the AndesMQTTBridge as required to bridge the MQTT functionality.

org.wso2.andes.mqtt.connectors.PersistenceStoreConnector

This class acts as an interface before storing MQTT messages to the message store, validating the message format, in addition to handling events such as consumer/publisher creation and closing in terms of the message store.

org.wso2.andes.mqtt.MQTTTopicManager

This class handles the lifecycle of MQTT subscriptions and also takes part in routing a given message to matching subscribers.

 

Message tracing

This is an MB-specific logging implementation for tracing a message through its inbound event until it is delivered to the consumer application. This implementation has minimal impact on the performance of the broker functionality. To enable message tracing in WSO2 MB:

  1. Open the log4j.properties file stored in the <MB_HOME>/repository/conf folder.
  2. Uncomment the following:

    Code Block
    #log4j.logger.org.wso2.andes.tools.utils.MessageTracer=TRACE,CARBON_TRACE_LOGFILE 

Once message tracing is enabled, you can start the server and execute a grep command with the relevant message ID you want to trace. This will give print all the logs related to your message ID on your terminal.

...