Package org.apache.activemq.network
Class ForwardingBridge
java.lang.Object
org.apache.activemq.network.ForwardingBridge
- All Implemented Interfaces:
org.apache.activemq.Service
Forwards all messages from the local broker to the remote broker.
-
Constructor Summary
ConstructorsConstructorDescriptionForwardingBridge(org.apache.activemq.transport.Transport localBroker, org.apache.activemq.transport.Transport remoteBroker) -
Method Summary
Modifier and TypeMethodDescriptionlonglongintbooleanbooleanprotected voidserviceLocalCommand(org.apache.activemq.command.Command command) voidserviceLocalException(Throwable error) protected voidserviceRemoteCommand(org.apache.activemq.command.Command command) voidserviceRemoteException(Throwable error) voidsetClientId(String clientId) voidsetDestinationFilter(String destinationFilter) voidsetDispatchAsync(boolean dispatchAsync) voidvoidsetPrefetchSize(int prefetchSize) voidsetUseCompression(boolean useCompression) voidstart()voidstop()protected void
-
Constructor Details
-
ForwardingBridge
public ForwardingBridge(org.apache.activemq.transport.Transport localBroker, org.apache.activemq.transport.Transport remoteBroker)
-
-
Method Details
-
start
- Specified by:
startin interfaceorg.apache.activemq.Service- Throws:
Exception
-
triggerStartBridge
- Throws:
IOException
-
stop
- Specified by:
stopin interfaceorg.apache.activemq.Service- Throws:
Exception
-
serviceRemoteException
-
serviceRemoteCommand
protected void serviceRemoteCommand(org.apache.activemq.command.Command command) -
serviceLocalException
-
serviceLocalCommand
protected void serviceLocalCommand(org.apache.activemq.command.Command command) -
getClientId
-
setClientId
-
getPrefetchSize
public int getPrefetchSize() -
setPrefetchSize
public void setPrefetchSize(int prefetchSize) -
isDispatchAsync
public boolean isDispatchAsync() -
setDispatchAsync
public void setDispatchAsync(boolean dispatchAsync) -
getDestinationFilter
-
setDestinationFilter
-
setNetworkBridgeFailedListener
-
getRemoteAddress
-
getLocalAddress
-
getLocalBrokerName
-
getRemoteBrokerName
-
getDequeueCounter
public long getDequeueCounter() -
getEnqueueCounter
public long getEnqueueCounter() -
setUseCompression
public void setUseCompression(boolean useCompression) - Parameters:
useCompression- True if forwarded Messages should have their bodies compressed.
-
isUseCompression
public boolean isUseCompression()- Returns:
- the vale of the useCompression setting, true if forwarded messages will be compressed.
-