Package pulp :: Package messaging :: Module consumer :: Class Consumer
[hide private]
[frames] | no frames]

Class Consumer

source code

endpoint.Endpoint --+
                    |
                   Consumer

An AMQP (abstract) consumer.

Instance Methods [hide private]
 
__init__(self, destination, **other) source code
str
id(self)
Get the endpoint id
source code
str
address(self)
Get the AMQP address for this endpoint.
source code
 
open(self)
Open and configure the consumer.
source code
 
start(self)
Start processing messages on the queue.
source code
 
stop(self)
Stop processing requests.
source code
 
join(self)
Join the worker thread.
source code
 
received(self, message)
Process received request.
source code
 
valid(self, envelope)
Check to see if the envelope is valid.
source code
 
dispatch(self, envelope)
Dispatch received request.
source code
str
__subject(self, message)
Extract the message subject.
source code
    Inherited from endpoint.Endpoint
 
__del__(self) source code
 
__str__(self) source code
 
ack(self)
Acknowledge all messages received on the session.
source code
 
close(self)
Close (shutdown) the endpoint.
source code
Connection
connection(self)
Get cached connection based on url.
source code
qpid.messaging.Session
session(self)
Get a session for the open connection.
source code
Class Methods [hide private]
    Inherited from endpoint.Endpoint
 
shutdown(cls)
Shutdown all connections.
source code
Class Variables [hide private]
    Inherited from endpoint.Endpoint
  LOCALHOST = 'tcp://localhost:5672'
Connection connectons
An AMQP connection.
Instance Variables [hide private]
    Inherited from endpoint.Endpoint
str uuid
The unique endpoint id.
Method Details [hide private]

__init__(self, destination, **other)
(Constructor)

source code 
Parameters:
  • destination (Destination) - The destination to consumer.
Overrides: endpoint.Endpoint.__init__

id(self)

source code 

Get the endpoint id

Returns: str
The destination (simple) address.
Overrides: endpoint.Endpoint.id

address(self)

source code 

Get the AMQP address for this endpoint.

Returns: str
The AMQP address.

open(self)

source code 

Open and configure the consumer.

Overrides: endpoint.Endpoint.open

received(self, message)

source code 

Process received request.

Parameters:
  • message (qpid.messaging.Message) - The received message.

valid(self, envelope)

source code 

Check to see if the envelope is valid.

Parameters:
  • envelope (qpid.messaging.Message) - The received envelope.

dispatch(self, envelope)

source code 

Dispatch received request.

Parameters:
  • envelope (qpid.messaging.Message) - The received envelope.

__subject(self, message)

source code 

Extract the message subject.

Parameters:
  • message (qpid.messaging.Message) - The received message.
Returns: str
The message subject