Class AMQP.Basic.Publish

  • All Implemented Interfaces:
    Serializable
    Enclosing class:
    AMQP.Basic

    public static class AMQP.Basic.Publish
    extends AbstractMarshallingMethod
    This method publishes a message to a specific exchange. The message will be routed to queues as defined by the exchange configuration and distributed to any active consumers when the transaction, if any, is committed.
    See Also:
    Serialized Form
    • Field Detail

      • reserved1

        public int reserved1
      • exchange

        public String exchange
        Specifies the name of the exchange to publish to. The exchange name can be empty, meaning the default exchange. If the exchange name is specified, and that exchange does not exist, the server will raise a channel exception.
      • routingKey

        public String routingKey
        Specifies the routing key for the message. The routing key is used for routing messages depending on the exchange configuration.
      • mandatory

        public boolean mandatory
        This flag tells the server how to react if the message cannot be routed to a queue. If this flag is set, the server will return an unroutable message with a Return method. If this flag is zero, the server silently drops the message.
      • immediate

        public boolean immediate
        This flag tells the server how to react if the message cannot be routed to a queue consumer immediately. If this flag is set, the server will return an undeliverable message with a Return method. If this flag is zero, the server will queue the message, but with no guarantee that it will ever be consumed.
    • Constructor Detail

      • Publish

        public Publish​(int reserved1,
                       String exchange,
                       String routingKey,
                       boolean mandatory,
                       boolean immediate)
        This method publishes a message to a specific exchange. The message will be routed to queues as defined by the exchange configuration and distributed to any active consumers when the transaction, if any, is committed.
      • Publish

        public Publish()