Class ConsumerRejectEvent

java.lang.Object
com.github.workerframework.util.rabbitmq.ConsumerRejectEvent
All Implemented Interfaces:
Event<QueueConsumer>

public class ConsumerRejectEvent extends Object implements Event<QueueConsumer>
A message reject Event for a Consumer.
  • Constructor Details

    • ConsumerRejectEvent

      public ConsumerRejectEvent(long tag)
      Create a new ConsumerRejectEvent.
      Parameters:
      tag - the RabbitMQ id of the message the Consumer should reject when this Event is triggered
  • Method Details

    • handleEvent

      public void handleEvent(QueueConsumer target)
      Trigger the action represented by this Event. Calls a Consumer to drop the message indicated by the id contained within this Event.
      Specified by:
      handleEvent in interface Event<QueueConsumer>
      Parameters:
      target - the class to perform an action on
    • getTag

      public long getTag()
      Returns:
      the RabbitMQ id of the message this Event will trigger a Consumer to reject