Class StandardMessageProducer
- All Implemented Interfaces:
AdaptrisComponent,AdaptrisMessageProducer,AdaptrisMessageSender,AdaptrisMessageWorker,ComponentLifecycle,ComponentLifecycleExtension,MessageEventGenerator
RabbitMQ requires you to programatically declare both the exchange and queue before use. If you are not targetting the default
exchange or have specific requirements about the queue declaration then please remember to configure a
Declaration.ExchangeDeclaration and Declaration.QueueDeclaration respectively. By default we simply use the default exchange and the queue is
declared to be durable, non-exclusive, with no auto-delete and no additional arguments.
Use a property-builder to configure how the BasicProperties object is created. Unless explicitly configured there will be no
additional properties in the call to Channel#basicPublish.
-
Field Summary
Fields inherited from class com.adaptris.core.AdaptrisMessageWorkerImp
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoProduce(AdaptrisMessage msg, String endpoint) endpoint(AdaptrisMessage msg) How the Exchange will be declared prior to use.How to build the requiredBasicPropertiesif required.getQueue()The queue to publish to.How the Queue will be declared prior to use.voidprepare()voidsetExchangeDeclaration(Declaration.ExchangeDeclaration exchangeDeclaration) How the Exchange will be declared prior to use.voidsetPropertyBuilder(Translator.BasicPropertiesBuilder propertyBuilder) How to build the requiredBasicPropertiesif required.voidThe queue to publish to.voidsetQueueDeclaration(Declaration.QueueDeclaration queueDeclaration) How the Queue will be declared prior to use.voidstart()voidstop()Methods inherited from class com.adaptris.core.ProduceOnlyProducerImp
produce, request, requestMethods inherited from class com.adaptris.core.AdaptrisMessageProducerImp
createNameMethods inherited from class com.adaptris.core.AdaptrisMessageWorkerImp
createQualifier, decode, encode, getEncoder, getIsTrackingEndpoint, getMessageFactory, getUniqueId, handleConnectionException, isTrackingEndpoint, registerConnection, registerEncoderMessageFactory, retrieveConnection, setEncoder, setIsTrackingEndpoint, setMessageFactory, setUniqueId, withMessageFactory, withUniqueIDMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueIdMethods inherited from interface com.adaptris.core.AdaptrisMessageWorker
decode, encode, getEncoder, getMessageFactory, handleConnectionException, registerConnection, retrieveConnection, setEncoder, setMessageFactoryMethods inherited from interface com.adaptris.core.ComponentLifecycle
close, initMethods inherited from interface com.adaptris.core.MessageEventGenerator
createQualifier, isTrackingEndpoint
-
Constructor Details
-
StandardMessageProducer
public StandardMessageProducer()
-
-
Method Details
-
prepare
- Throws:
CoreException
-
start
- Throws:
CoreException
-
stop
public void stop() -
doProduce
- Specified by:
doProducein classProduceOnlyProducerImp- Throws:
ProduceException
-
withPropertyBuilder
-
endpoint
- Specified by:
endpointin classAdaptrisMessageProducerImp- Throws:
ProduceException
-
withQueue
-
getQueue
The queue to publish to. -
setQueue
The queue to publish to. -
getPropertyBuilder
How to build the requiredBasicPropertiesif required.The default if not explicitly specified is to return a
nullobject which uses the default behaviour of RabbitMQ -
setPropertyBuilder
How to build the requiredBasicPropertiesif required.The default if not explicitly specified is to return a
nullobject which uses the default behaviour of RabbitMQ -
getExchangeDeclaration
How the Exchange will be declared prior to use. -
setExchangeDeclaration
How the Exchange will be declared prior to use. -
getQueueDeclaration
How the Queue will be declared prior to use. -
setQueueDeclaration
How the Queue will be declared prior to use.
-