Class AMQPFederationSource

  • All Implemented Interfaces:
    Federation, FederationInternal

    public class AMQPFederationSource
    extends AMQPFederation
    This is the initiating side of a broker federation that occurs over an AMQP broker connection.

    This endpoint will create a control link to the remote peer that is a sender of federation commands which can be used to instruct the remote to initiate federation operations back to this peer over the same connection and without the need for local configuration.

    • Constructor Detail

      • AMQPFederationSource

        public AMQPFederationSource​(String name,
                                    Map<String,​Object> properties,
                                    AMQPBrokerConnection connection)
        Creates a new AMQP Federation instance that will manage the state of a single AMQP broker federation instance using an AMQP broker connection as the IO channel.
        Parameters:
        name - The name of this federation instance.
        properties - A set of optional properties that provide additional configuration.
        connection - The broker connection over which this federation will occur.
    • Method Detail

      • getLinkAttachTimeout

        public int getLinkAttachTimeout()
        Specified by:
        getLinkAttachTimeout in class AMQPFederation
        Returns:
        the timeout before signaling an error when creating remote link (0 mean disable).
      • getReceiverCredits

        public int getReceiverCredits()
        Specified by:
        getReceiverCredits in class AMQPFederation
        Returns:
        the configured Receiver link credit batch size.
      • getReceiverCreditsLow

        public int getReceiverCreditsLow()
        Specified by:
        getReceiverCreditsLow in class AMQPFederation
        Returns:
        the configured Receiver link credit low value.
      • getLargeMessageThreshold

        public int getLargeMessageThreshold()
        Specified by:
        getLargeMessageThreshold in class AMQPFederation
        Returns:
        the size in bytes before a message is considered large.
      • isCoreMessageTunnelingEnabled

        public boolean isCoreMessageTunnelingEnabled()
        Specified by:
        isCoreMessageTunnelingEnabled in class AMQPFederation
        Returns:
        the true if the federation should support core message tunneling.
      • isIgnoreQueueConsumerFilters

        public boolean isIgnoreQueueConsumerFilters()
        Specified by:
        isIgnoreQueueConsumerFilters in class AMQPFederation
        Returns:
        the true if the federation should ignore filters on queue consumers.
      • isIgnoreQueueConsumerPriorities

        public boolean isIgnoreQueueConsumerPriorities()
        Specified by:
        isIgnoreQueueConsumerPriorities in class AMQPFederation
        Returns:
        the true if the federation should ignore priorities on queue consumers.
      • handleConnectionDropped

        public void handleConnectionDropped()
                                     throws ActiveMQException
        Called by the parent broker connection when the connection has failed and this federation should tear down any active resources and await a reconnect if one is allowed.
        Throws:
        ActiveMQException - if an error occurs processing the connection dropped event
      • handleConnectionRestored

        public void handleConnectionRestored​(AMQPConnectionContext connection,
                                             AMQPSessionContext session)
                                      throws ActiveMQException
        Called by the parent broker connection when the connection has been established and this federation should build up its active state based on the configuration.
        Parameters:
        connection - The new Connection that represents the currently active connection.
        session - The new Session that was created for use by broker connection resources.
        Throws:
        ActiveMQException - if an error occurs processing the connection restored event
      • signalResourceCreateError

        protected void signalResourceCreateError​(Exception cause)
        Description copied from class: AMQPFederation
        Error signaling API that must be implemented by the specific federation implementation to handle error when creating a federation resource such as an outgoing receiver link.
        Specified by:
        signalResourceCreateError in class AMQPFederation
        Parameters:
        cause - The error that caused the resource creation to fail.
      • signalError

        protected void signalError​(Exception cause)
        Description copied from class: AMQPFederation
        Error signaling API that must be implemented by the specific federation implementation to handle errors encountered during normal operations.
        Specified by:
        signalError in class AMQPFederation
        Parameters:
        cause - The error that caused the operation to fail.
      • interceptLinkClosedEvent

        protected boolean interceptLinkClosedEvent​(org.apache.qpid.proton.engine.Link link)