Skip to content

Commit

Permalink
Merge pull request #45 from mokshaproject/stomp-protocol-debug
Browse files Browse the repository at this point in the history
Some debug statements.
  • Loading branch information
ralphbean committed Jun 22, 2017
2 parents 3c787aa + 4464dab commit a9f9ae3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions moksha.hub/moksha/hub/stomp/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def subscribe(self, dest, **headers):
else:
f.unpack(stomper.subscribe(dest, ack=ack))
f.headers.update(headers)
self.transport.write(f.pack())
cmd = f.pack()
log.debug(cmd)
self.transport.write(cmd)

def connectionMade(self):
""" Register with stomp server """
Expand All @@ -88,6 +90,7 @@ def connectionMade(self):
cmd = stomper.connect(self.username, self.password, host, interval)
else:
cmd = stomper.connect(self.username, self.password)
log.debug(cmd)
self.transport.write(cmd)

def dataReceived(self, data):
Expand Down Expand Up @@ -122,5 +125,5 @@ def dataReceived(self, data):
response = stomper.stomp_11.nack(message_id, subscription, transaction_id)

# Finally, send our response (ACK or NACK) back to the broker.
log.debug("StompProtocol response: %r", response)
log.debug(response)
self.transport.write(response)

0 comments on commit a9f9ae3

Please sign in to comment.