7980818283848586878889
if (subject != null) msg.setSubject(subject); for (String body : bodies) { msg.setBody(new AmqpValue(body)); mng.put(msg); } mng.send(); mng.stop(); } catch (Exception e) { tracer.log(Level.SEVERE, "proton error", e); } }
1920212223242526272829
msg.setAddress(ADDRESS); msg.setSubject("hello"); msg.setContentType("application/octet-stream"); msg.setBody(new Data(new Binary("hello world".getBytes()))); mng.put(msg); mng.send(); mng.subscribe(ADDRESS); mng.recv(); Message msg2 = mng.get(); assertEquals(msg.getSubject(), msg2.getSubject());