View Javadoc

1   package com.atlassian.messagequeue;
2   
3   import com.atlassian.annotations.PublicApi;
4   
5   /**
6    * Interface for running messages.
7    * @since 1.0
8    */
9   @PublicApi
10  public interface MessageRunnerService {
11  
12      /**
13       * Adds a message that will be executed at some future point. Messages may not be executed in the order in which they
14       * are added.
15       * @param message message specification
16       * @throws MessageRunnerNotRegisteredException if no runner is registered for the given message's runner key
17       * @throws MessagePayloadSizeExceededException when a payload that is too large is passed
18       * @throws MessageRunnerServiceException if the message could not be added because of an implementation specific problem
19       */
20      void addMessage(Message message);
21  }