Class Destination

java.lang.Object
com.trafficparrot.sdk.messaging.Destination
All Implemented Interfaces:
Comparable<Destination>
Direct Known Subclasses:
Destination

public class Destination extends Object implements Comparable<Destination>
A messaging destination (queue or topic) identified by name and type.

This is the canonical location for Destination. The deprecated Destination extends this class for backward compatibility - existing SDK plugins continue to work unchanged.

  • Field Details

    • name

      public final String name
      The name of the queue or topic. For file messages, the path of the directory.
    • type

      public final DestinationType type
      Whether it is a queue or a topic: DestinationType.QUEUE or DestinationType.TOPIC.
    • skipDeclare

      public final boolean skipDeclare
      For an AMQP broker, whether Traffic Parrot leaves the destination undeclared on the broker. It means nothing for IBM MQ and for file messages.
    • declareArguments

      public final Map<String,Object> declareArguments
      For an AMQP broker, the arguments Traffic Parrot declares the destination with; empty when there are none. The map cannot be changed.
  • Constructor Details

    • Destination

      public Destination(String name, DestinationType type)
      Creates a destination that is declared on an AMQP broker with no arguments, which is what a transformer usually wants: new Destination("orders.reply", DestinationType.QUEUE).
      Parameters:
      name - the name of the queue or topic
      type - whether it is a queue or a topic
    • Destination

      public Destination(String name, DestinationType type, boolean skipDeclare, Map<String,Object> declareArguments)
      Creates a destination with every field a mapping file can set.
      Parameters:
      name - the name of the queue or topic
      type - whether it is a queue or a topic
      skipDeclare - for an AMQP broker, true to leave the destination undeclared on the broker
      declareArguments - for an AMQP broker, the arguments to declare the destination with; null for none
  • Method Details