Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

src/s/a/SAPO-Broker-0.0.2/src/Broker/Clients/Async.py   SAPO-Broker(Download)
from __future__ import with_statement #for python 2.5
 
from Broker.Messages import Message, Subscribe, Unsubscribe, Acknowledge, Publish, Acknowledge, Notification, Poll, Fault, Ping, Pong, Accepted
from Broker.Transport import TCP, UDP
from Broker.Clients import Minimal
    def publish(self, payload, destination, destination_type='TOPIC', expiration=None):
        message = Message(payload=payload, expiration=expiration)
 
        self.__log.debug('publish(%r, %r, %r, %r)', message, destination, destination_type, expiration)
        return self.send(Publish(message, destination, destination_type))