Version: 10.16.0
Namespace

solace.MessageConsumerEventName

Contents

namespace solace.MessageConsumerEventName

An enumeration of message consumer event names. A solace.MessageConsumer will emit these events as part of its lifecycle. Applications, having created a MessageConsumer can choose to listen to all of the events described here, or any subset of these events. For Example:

  
    mc = solace.Session.createMessageConsumer(...);
    mc.on(solace.MessageConsumerEventName.CONNECT_FAILED_ERROR,
          function connectFailedErrorEventCb(error) {
            // error can be used as an OperationError object
          });
  

Static Properties & Enumerations Top

string ACTIVE = MessageConsumerEventName_active
string CONNECT_FAILED_ERROR = MessageConsumerEventName_connectFailedError
string DISPOSED = MessageConsumerEventName_disposed
string DOWN = MessageConsumerEventName_down
string DOWN_ERROR = MessageConsumerEventName_downError
string GM_DISABLED = MessageConsumerEventName_GMDisabled
string INACTIVE = MessageConsumerEventName_inactive
string MESSAGE = MessageConsumerEventName_message
string RECONNECTED = MessageConsumerEventName_reconnected
string RECONNECTING = MessageConsumerEventName_reconnecting
string SUBSCRIPTION_ERROR = MessageConsumerEventName_error
string SUBSCRIPTION_OK = MessageConsumerEventName_ok
string UP = MessageConsumerEventName_up

Events Top

void ACTIVE ( )
void CONNECT_FAILED_ERROR ( solace.OperationError error )
void DISPOSED ( )
void DOWN ( )
void DOWN_ERROR ( solace.OperationError error )
void GM_DISABLED ( )
void INACTIVE ( )
void MESSAGE ( solace.Message message )
void RECONNECTED ( )
void RECONNECTING ( solace.OperationError error )
void SUBSCRIPTION_ERROR ( solace.MessageConsumerEvent error )
void SUBSCRIPTION_OK ( solace.MessageConsumerEvent event )
void UP ( )

Static Properties & Enumerations Detail Top

static public string ACTIVE = MessageConsumerEventName_active

static public string CONNECT_FAILED_ERROR = MessageConsumerEventName_connectFailedError

static public string DISPOSED = MessageConsumerEventName_disposed

static public string DOWN = MessageConsumerEventName_down

static public string DOWN_ERROR = MessageConsumerEventName_downError

static public string GM_DISABLED = MessageConsumerEventName_GMDisabled

static public string INACTIVE = MessageConsumerEventName_inactive

static public string MESSAGE = MessageConsumerEventName_message

static public string RECONNECTED = MessageConsumerEventName_reconnected

static public string RECONNECTING = MessageConsumerEventName_reconnecting

static public string SUBSCRIPTION_ERROR = MessageConsumerEventName_error

static public string SUBSCRIPTION_OK = MessageConsumerEventName_ok

static public string UP = MessageConsumerEventName_up

Events Detail Top

public void ACTIVE ( )

The message consumer has become active.

Return Value

void

public void CONNECT_FAILED_ERROR ( solace.OperationError error )

The message consumer attempted to connect but was unsuccessful. The message consumer is disabled.

Parameters

solace.OperationError error

Details of the error.

Return Value

void

public void DISPOSED ( )

The message consumer is being disposed. No further events will be emitted.

Return Value

void

public void DOWN ( )

The message consumer is successfully disconnected. The message consumer is disabled.

Return Value

void

public void DOWN_ERROR ( solace.OperationError error )

The message consumer was established and then disconnected by the router, likely due to operator intervention. The message consumer is disabled.

Parameters

solace.OperationError error

Details of the error.

Return Value

void

public void GM_DISABLED ( )

The message consumer will not connect because the current session is incompatible with Guaranteed Messaging. The message consumer is disabled until a compatible session is available.

Return Value

void

public void INACTIVE ( )

The message consumer has become inactive.

Return Value

void

public void MESSAGE ( solace.Message message )

A message was received on the message consumer.

If the application throws an exception in this listener, and the consumer was configured to automatically acknowledge messages (see solace.MessageConsumerProperties#acknowledgeMode), the API will not acknowledge the message, since it may not have been successfully processed by the application. Such a message must be acknowledged manually. If the application did not retain a reference to the message, it may be redelivered by calling solace.MessageConsumer#disconnect followed by solace.MessageConsumer#connect depending on the configuration of the queue.

When there is no listener for MESSAGE on a MessageConsumer, messages are queued internally until a listener is added.

Parameters

solace.Message message

The received message being delivered in this event.

Return Value

void

public void RECONNECTED ( )

The message consumer successfully auto-reconnected.

Return Value

void

public void RECONNECTING ( solace.OperationError error )

The message consumer was established and then disconnected by the router, likely due to operator intervention, but flow auto reconnect is active. The message consumer is disabled, but actively reconnecting. Expect a RECONNECTED or DOWN_ERROR on success of failure. respectively. See also MessageConsumerProperties.reconnectAttempts and reconnectIntervalInMsecs.

Parameters

solace.OperationError error

Details of the error that triggered the reconnect.

Return Value

void

public void SUBSCRIPTION_ERROR ( solace.MessageConsumerEvent error )

The Solace Message Router rejected a queue subscription (add or remove).

Parameters

solace.MessageConsumerEvent error

The details related to the failed subscription update.

Return Value

void

public void SUBSCRIPTION_OK ( solace.MessageConsumerEvent event )

The subscribe or unsubscribe operation succeeded on the queue.

Parameters

solace.MessageConsumerEvent event

The details related to the successful subscription update.

Return Value

void

public void UP ( )

The message consumer is established.

Return Value

void