disconnect_non_acking_consumers

This parameter works in conjunction with the maxbytes and maxmsgs destination properties. In situations where consumers consume messages but do not acknowledge them, the messages are held in the server until they are confirmed. This can push the server above the set limits.

disconnect_non_acking_consumers = enabled | disabled

When enabled, disconnect_non_acking_consumers causes the server to check the number and size of pending messages sent to a consumer. If the maxbytes or maxmsgs limit is reached and the consumer has not acknowledged its messages, the server discards the messages sent to the consumer and disconnects the consumer’s connection. This protects the server against applications that consume messages without ever acknowledging them.

Before enabling this property, ensure that the maxbytes and maxmsgs limits are set with reference to the prefetch setting, the size of the transaction (if transacted receive), or number of messages acknowledged when using client or explicit client acknowledgment mode. Otherwise the server may disconnect the consumer before it has a chance to acknowledge the messages.

When routes are deployed, all routed servers should use the same disconnect_non_acking_consumers setting. Additionally, if maxbytes or maxmsgs is set for a global destination, the same setting should be applied on all servers. The server does not discard or disconnect a routed consumer, since disconnecting the route may impact other well-behaved applications. Servers discard and disconnect their local consumers, which other servers involved are made aware of and discard messages for those remote consumers accordingly.

This parameter is disabled by default.