You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

This transport handler allow to send and receive object via the AQMP protocol, implemented with RabbitMQ (see http://www.rabbitmq.com/). Further parameter information can be found here: http://www.rabbitmq.com/api-guide.html

Options

  • queue_name: The Queue to send to or receive from

  • consumer_tag: The consumer tag

  • host: The host where the server runs

  • port: The port of the server (if not default)

  • user: Username (if required)

  • password: Password (if required)

  • virtualhost: The virtual host (if required)

  • publishstyle: Specifies how messages will be sent (default: workqueue)

Example

/// Send elements to bus
SENDER = SENDER({
              transport='RabbitMQ',
              wrapper='GenericPush',
              protocol='SimpleByteBuffer',
              datahandler='Tuple',
              SINK="SENDER",
              options=[
                ['QUEUE_NAME','nexmark'],
                ['CONSUMER_TAG','person'],
                ['HOST','localhost'],
                ['ByteOrder', 'LittleEndian']
              ]                        
            },
            nexmark:person
          )

/// Receive elements from bus
input = ACCESS({
            transport='RabbitMQ',
            source= 'Receiver',
            wrapper='GenericPush',
            protocol='SimpleByteBuffer',
            datahandler='Tuple',
            options=[
              ['QUEUE_NAME','nexmark'],
              ['CONSUMER_TAG','person'],
              ['HOST','localhost'],
              ['ByteOrder', 'LittleEndian']
            ],
            schema=[
              ['TIMESTAMP', 'STARTTIMESTAMP'],
              ['id', 'INTEGER'],
              ['name', 'STRING'],
              ['email', 'STRING'],
              ['creditcard', 'STRING'],
              ['city', 'STRING'],
              ['state', 'STRING']
            ]                                            
          }                
        )


  • No labels