Interface IPeekableListener<M>

All Superinterfaces:
org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.Aware, IConfigurable, IConfigurationAware, IListener<M>, INamedObject, IPullingListener<M>, IScopeProvider
All Known Implementing Classes:
JdbcListener, JdbcQueryListener, JdbcTableListener, MessageStoreListener

public interface IPeekableListener<M> extends IPullingListener<M>
PullingListener extension that checks for available messages to retrieve without starting a XA transaction. With a MS SQL database and a high load it has been noticed that the application and database transaction coordinator were out of sync which resulted in hanging distributed transactions.
  • Method Details

    • hasRawMessageAvailable

      boolean hasRawMessageAvailable() throws ListenerException
      Throws:
      ListenerException
    • setPeekUntransacted

      void setPeekUntransacted(boolean b)
      when true, then PollingListener container will execute getRawMessage() only when hasRawMessageAvailable() has returned true. This avoids rolling back a lot of XA transactions, that appears to be problematic on MS SQL Server
      Default value
      true
    • isPeekUntransacted

      boolean isPeekUntransacted()