// Example of creating subscriptions with various options. func ExampleConn_Subscribe_2(c *stomp.Conn) error { // Subscribe to queue with automatic acknowledgement sub1, err := c.Subscribe("/queue/test-1", stomp.AckAuto) if err != nil { return err } // Subscribe to queue with client acknowledgement and a custom header value sub2, err := c.Subscribe("/queue/test-2", stomp.AckClient, stomp.SubscribeOpt.Header("x-custom-header", "some-value")) if err != nil { return err } doSomethingWith(sub1, sub2) return nil }