## Contents

- Static Properties & Enumerations
- Events

namespace solace.SessionEventCode

An attribute of SessionEvent. This enumeration represents the different events emitted by Session through the session event callback.

When a session is no longer in a usable state, the API tears down the underlying connection and notifies the application with one of the following session events:

- solace.SessionEventCode#event:DOWN_ERROR
- solace.SessionEventCode#event:CONNECT_FAILED_ERROR

## Static Properties & Enumerations Top

number | ACKNOWLEDGED_MESSAGE = `25` |  |
number | CAN_ACCEPT_DATA = `13` |  |
number | CONNECT_FAILED_ERROR = `2` |  |
number | DISCONNECTED = `14` |  |
number | DOWN_ERROR = `1` |  |
number | GUARANTEED_MESSAGE_PUBLISHER_DOWN = `29` |  |
number | MESSAGE = `28` |  |
number | PROPERTY_UPDATE_ERROR = `11` |  |
number | PROPERTY_UPDATE_OK = `10` |  |
number | RECONNECTED_NOTICE = `23` |  |
number | RECONNECTING_NOTICE = `22` |  |
number | REJECTED_MESSAGE_ERROR = `4` |  |
number | REPUBLISHING_UNACKED_MESSAGES = `24` |  |
number | REQUEST_ABORTED = `8` |  |
number | REQUEST_TIMEOUT = `9` |  |
number | SUBSCRIPTION_ERROR = `5` |  |
number | SUBSCRIPTION_OK = `6` |  |
number | UNSUBSCRIBE_TE_TOPIC_ERROR = `27` |  |
number | UNSUBSCRIBE_TE_TOPIC_OK = `26` |  |
number | UP_NOTICE |  |
number | VIRTUALROUTER_NAME_CHANGED = `7` |  |

## Events Top

void | ACKNOWLEDGED_MESSAGE ( solace.SessionEvent event ) |
void | CAN_ACCEPT_DATA ( ) |
void | CONNECT_FAILED_ERROR ( solace.OperationError error ) |
void | DISCONNECTED ( ) |
void | DOWN_ERROR ( solace.OperationError error ) |
void | GUARANTEED_MESSAGE_PUBLISHER_DOWN ( solace.OperationError error ) |
void | MESSAGE ( solace.Message message ) |
void | PROPERTY_UPDATE_ERROR ( solace.RequestError error ) |
void | PROPERTY_UPDATE_OK ( solace.SessionEvent event ) |
void | RECONNECTED_NOTICE ( solace.SessionEvent event ) |
void | RECONNECTING_NOTICE ( solace.SessionEvent event ) |
void | REJECTED_MESSAGE_ERROR ( solace.RequestError error ) |
void | REPUBLISHING_UNACKED_MESSAGES ( solace.SessionEvent event ) |
void | SUBSCRIPTION_ERROR ( solace.RequestError error ) |
void | SUBSCRIPTION_OK ( solace.SessionEvent event ) |
void | UNSUBSCRIBE_TE_TOPIC_ERROR ( solace.OperationError error ) |
void | UNSUBSCRIBE_TE_TOPIC_OK ( ) |
void | UP_NOTICE ( ) |
void | VIRTUALROUTER_NAME_CHANGED ( solace.SessionEvent event ) |

## Static Properties & Enumerations Detail Top

###
static public number ACKNOWLEDGED_MESSAGE = `25`

###
static public number CAN_ACCEPT_DATA = `13`

###
static public number CONNECT_FAILED_ERROR = `2`

###
static public number DISCONNECTED = `14`

###
static public number DOWN_ERROR = `1`

###
static public number GUARANTEED_MESSAGE_PUBLISHER_DOWN = `29`

###
static public number MESSAGE = `28`

###
static public number PROPERTY_UPDATE_ERROR = `11`

###
static public number PROPERTY_UPDATE_OK = `10`

###
static public number RECONNECTED_NOTICE = `23`

###
static public number RECONNECTING_NOTICE = `22`

###
static public number REJECTED_MESSAGE_ERROR = `4`

###
static public number REPUBLISHING_UNACKED_MESSAGES = `24`

###
static public number REQUEST_ABORTED = `8`

Deprecated: A request was aborted because the session is being disconnected. Use solace.RequestFailEvent instead.

###
static public number REQUEST_TIMEOUT = `9`

Deprecated: The event represents a timed-out request API call. Use solace.RequestFailEvent instead.

###
static public number SUBSCRIPTION_ERROR = `5`

###
static public number SUBSCRIPTION_OK = `6`

###
static public number UNSUBSCRIBE_TE_TOPIC_ERROR = `27`

###
static public number UNSUBSCRIBE_TE_TOPIC_OK = `26`

###
static public number UP_NOTICE

###
static public number VIRTUALROUTER_NAME_CHANGED = `7`

## Events Detail Top

###
public void ACKNOWLEDGED_MESSAGE ( solace.SessionEvent event )

A message was acknowledged by the router.

#### Parameters

solace.SessionEvent | event Allows the acknowledgement to be correlated to the sent message.

#### Return Value

void |

###
public void CAN_ACCEPT_DATA ( )

The session transport can accept data again. This event will occur after an solace.OperationError is thrown from an API call with a subcode of solace.ErrorSubcode.INSUFFICIENT_SPACE to indicate the operation can be retried. This event is used both after session-level transport buffer exhaustion, and Guaranteed Messaging Window exhaustion.

#### Return Value

void |

###
public void CONNECT_FAILED_ERROR ( solace.OperationError error )

The session attempted to connect but was unsuccessful.

#### Parameters

solace.OperationError | error The details related to the failed connection attempt.

#### Return Value

void |

###
public void DISCONNECTED ( )

The session connect operation failed, or the session that was once up, is now disconnected.

#### Return Value

void |

###
public void DOWN_ERROR ( solace.OperationError error )

The session was established and then went down.

#### Parameters

solace.OperationError | error The details related to the session failure.

#### Return Value

void |

###
public void GUARANTEED_MESSAGE_PUBLISHER_DOWN ( solace.OperationError error )

Guaranteed Messaging Publisher has been closed by the Solace message router. This usually indicates an operator has disabled the message spool.

#### Parameters

solace.OperationError | error Information related to the error.

#### Return Value

void |

###
public void MESSAGE ( solace.Message message )

A Direct message was received on the session. This event code is only used on the EventEmitter session interface. If using the deprecated callback interface, messages are received via the callback provided in solace.MessageRxCBInfo.

#### Parameters

solace.Message | message The message received on the session.

#### Return Value

void |

###
public void PROPERTY_UPDATE_ERROR ( solace.RequestError error )

The event represents a failed update of a mutable session property.

#### Parameters

solace.RequestError | error The details related to the failed property update.

#### Return Value

void |

###
public void PROPERTY_UPDATE_OK ( solace.SessionEvent event )

The event represents a successful update of a mutable session property.

#### Parameters

solace.SessionEvent | event Information related to the successful property update.

#### Return Value

void |

###
public void RECONNECTED_NOTICE ( solace.SessionEvent event )

The automatic reconnect of the Session was successful, and the session is established again.

#### Parameters

solace.SessionEvent | event The details related to the re-establishment of the connection.

#### Return Value

void |

###
public void RECONNECTING_NOTICE ( solace.SessionEvent event )

The session has gone down, and an automatic reconnection attempt is in progress.

#### Parameters

solace.SessionEvent | event The details related to the cause of the connection interruption.

#### Return Value

void |

###
public void REJECTED_MESSAGE_ERROR ( solace.RequestError error )

The Solace Message Router rejected a published message.

#### Parameters

solace.RequestError | error The details related to the rejected message.

#### Return Value

void |

###
public void REPUBLISHING_UNACKED_MESSAGES ( solace.SessionEvent event )

The session has automatically recovered after the Guaranteed Message publisher failed to reconnect. Messages sent but not acknowledged are being renumbered and retransmitted. Some messages may be duplicated in the system.

#### Parameters

solace.SessionEvent | event The details related to the republishing of messages on the session. solace.SessionEvent#infoStr will indicate the number of messages being republished, which is an upper bound on the number of messages that could be duplicated due to this action.

#### Return Value

void |

###
public void SUBSCRIPTION_ERROR ( solace.RequestError error )

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

#### Parameters

solace.RequestError | error The details related to the failed subscription update.

#### Return Value

void |

###
public void SUBSCRIPTION_OK ( solace.SessionEvent event )

The subscribe or unsubscribe operation succeeded.

#### Parameters

solace.SessionEvent | event The details related to the successful subscription update.

#### Return Value

void |

###
public void UNSUBSCRIBE_TE_TOPIC_ERROR ( solace.OperationError error )

Unsubscribing the topic from the Durable Topic Endpoint failed.

#### Parameters

solace.OperationError | error The details related to the failed attempt to remove the subscription from a topic endpoint.

#### Return Value

void |

###
public void UNSUBSCRIBE_TE_TOPIC_OK ( )

Unsubscribing the topic from the Durable Topic Endpoint succeeded.

#### Return Value

void |

###
public void UP_NOTICE ( )

The Session is ready to send/receive messages and perform control operations.

At this point the transport session is up, the Session has logged in, and the P2PInbox subscription is added.

The session is established.

#### Return Value

void |

###
public void VIRTUALROUTER_NAME_CHANGED ( solace.SessionEvent event )

The Solace Message Router's Virtual Router Name changed during a reconnect operation.

#### Parameters

solace.SessionEvent | event Information related to the event.

#### Return Value

void |