WAS v8.5 > WebSphere applications > Service integration > Messaging engines

Mechanisms for stopping messaging engines

There are several different mechanisms used to stop messaging engines. We can also specify two different degrees of urgency: immediate and force. Stopping a messaging engine prevents it from sending messages.

We can stop messaging engines by:

We can stop a messaging engine in two modes: immediate and force.

Immediate

In immediate mode, the messaging engine is stopped on completion of all the messaging operations that are current at the time of the stop request. No notification is sent to the application to indicate the messaging engine is stopping. After a stop command has been issued, the messaging engine does not allow new operations to be started.

For each existing connection, the messaging engine waits for the current operation to complete, unless the operation blocks processing in the messaging engine, such as a receive operation. In this case, the operation is interrupted. Asynchronous consumers are allowed to complete even though they might take an arbitrary amount of time to process the current message. The messaging engine then backs out of active transactions and disallows further operations on that connection. When all connections are in this invalidated state, the messaging engine stops.

Force

In force mode, the messaging engine is stopped so that any current transactions are pre-empted and applications are forcefully disconnected.

Force mode is like immediate mode, except that stopping the messaging engine interrupts messaging operations on application threads that are taking place at the time the stop command is issued. Rather than allowing existing messaging operations to complete, the messaging engine interrupts them and then disallows further operations. When all connections are in this state, the messaging engine stops.

Force mode completes the shutdown of the messaging engine as fast as possible. A subsequent restart of the messaging engine might take longer than if it had been stopped using immediate mode, because more recovery actions are needed. For example, force mode stop can leave messages with indoubt transactions and you must deal with these messages as described in Resolve indoubt transactions.

We can escalate an immediate stop that is taking too long to force a stop.

The following stop modes are possible for the different stop mechanisms:

Comparison of stop mechanisms. The first column lists the mechanisms for stopping the messages. The second column states whether the immediate mode is used as the stopping mechanism. The third column states whether the force mode is used as the stopping mechanism.

Stop mechanism Immediate Force
Administrative console Yes Yes
JMX stop command Yes Yes
stopServer command Yes No

If the messaging engine reports isAlive=false to the HA Manager, the whole application server process is stopped without completions of current transactions or cleanup. This result is equivalent to a forced stop.


Related


Start a messaging engine
Stopping a messaging engine


+

Search Tips   |   Advanced Search