Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 839152 Details for
Bug 975444
provide access to all properties in an AMQP 1.0 message
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
modified example
Recv.java (text/x-java), 3.94 KB, created by
Gordon Sim
on 2013-12-19 18:24:38 UTC
(
hide
)
Description:
modified example
Filename:
MIME Type:
Creator:
Gordon Sim
Created:
2013-12-19 18:24:38 UTC
Size:
3.94 KB
patch
obsolete
> >/* > * > * Licensed to the Apache Software Foundation (ASF) under one > * or more contributor license agreements. See the NOTICE file > * distributed with this work for additional information > * regarding copyright ownership. The ASF licenses this file > * to you under the Apache License, Version 2.0 (the > * "License"); you may not use this file except in compliance > * with the License. You may obtain a copy of the License at > * > * http://www.apache.org/licenses/LICENSE-2.0 > * > * Unless required by applicable law or agreed to in writing, > * software distributed under the License is distributed on an > * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY > * KIND, either express or implied. See the License for the > * specific language governing permissions and limitations > * under the License. > * >*/ >package org.apache.qpid.proton.messenger.examples; > >import org.apache.qpid.proton.message.Message; >import org.apache.qpid.proton.message.MessageFormat; >import org.apache.qpid.proton.messenger.Messenger; >import org.apache.qpid.proton.messenger.impl.MessengerImpl; > >public class Recv >{ > public static void main(String[] argv) throws Throwable > { > Messenger mgr = new MessengerImpl(); > mgr.start(); > > String address = argv.length > 0 ? argv[0] : "amqp://~0.0.0.0"; > //mgr.subscribe("amqp://0.0.0.0/my-queue"); > mgr.subscribe(address); > > boolean done = false; > while (!done) { > mgr.recv(10); > while (mgr.incoming() > 0) { > Message msg = mgr.get(); > //TODO: shouldn't need the following line > //msg.setMessageFormat(MessageFormat.TEXT); > > if (false) { > System.out.println(msg.getAddress() + " " + (msg.getSubject() == null ? "(no subject)" : msg.getSubject()) + " " + msg.save()); > } else { > //long version > System.out.println(" HEADER"); > System.out.println(" durable : " + msg.isDurable()); > System.out.println(" priority : " + msg.getPriority()); > System.out.println(" ttl : " + msg.getTtl()); > System.out.println(" first acquirer : " + msg.isFirstAcquirer()); > System.out.println(" delivery count : " + msg.getDeliveryCount()); > > System.out.println(" PROPERTIES"); > System.out.println(" message id : " + msg.getMessageId()); > System.out.println(" user id : " + new String(msg.getUserId(), "UTF-8")); > System.out.println(" to : " + msg.getAddress()); > System.out.println(" subject : " + msg.getSubject()); > System.out.println(" reply to : " + msg.getReplyTo()); > System.out.println(" correlation id : " + msg.getCorrelationId()); > System.out.println(" content type : " + msg.getContentType()); > System.out.println(" content encoding: " + msg.getContentEncoding()); > System.out.println(" expiry time : " + msg.getExpiryTime()); > System.out.println(" creation time : " + msg.getCreationTime()); > System.out.println(" group id : " + msg.getGroupId()); > System.out.println(" group sequence : " + msg.getGroupSequence()); > > System.out.println(" APPLICATION PROPERTIES"); > java.util.Map props = msg.getApplicationProperties().getValue(); > for (Object key : props.keySet()) { > System.out.println(" " + key + ": " + props.get(key)); > } > > System.out.println(" APPLICATION DATA"); > System.out.println(" " + msg.save()); > } > } > } > > mgr.stop(); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 975444
:
762475
|
839151
| 839152