1. hozn
  2. stompclient
  3. Pull requests

Pull requests

#2 Merged
Repository
Deleted repository
Branch
default (5e951a0f92c1)
Repository
stompclient
Branch
default

add basic context manager support for client connection

Author
  1. Richard Jones
Reviewers
Description

This is a convenience for the most basic usage of the stomp library that I think has merit. The basic usage becomes:

from stompclient import PublishClient with PublishClient('localhost', 61613) as client: client.send('/queue/hello', 'Hello, world!')

Comments (2)

  1. Richard Jones author

    Ugh, sorry about the formatting there. The "basic usage" should be:

    from stompclient import PublishClient
    with PublishClient('localhost', 61613) as client:
        client.send('/queue/hello', 'This is the body.')
    
    1. hozn repo owner

      Yeah, this sounds useful. Thank you! I will go through issues soon and see if there is anything else I can close out for another release.