Hello,
what's the objective that you are trying to achieve?

Do you mean that you want a producer client to be able to work out the source port the connection is using, or given a producer client, a broker and a consumer client you want to figure out from the broker say what the source port is on inbound connections?

I don't thing either scenario is necessarily trivial.

In the first scenario if you are in Qpid Client code you normally use an API such as qpid::messaging in C++ or JMS in Java to provide an abstraction for creating a Connection, a Session etc.

In a Messaging system these abstractions tend to be pretty high level, so for example with JMS I'm pretty certain that there's not any way in the API to retrieve the underlying Socket or InetAddr. You *might* be able to get to the Socket by down-casting to the Qpid specific class that is implementing javax.jms.Connection and digging around there (similar for qpid::messaging) but it's not certain if this is even exposed on a public method on a private class.


If it's the second scenario then it's not trivial but it is exposed, the QMF connection ManagementObject exposes the host and port info for both sides in the address property (the old 0.8 broker only exposed one end but from 0.10 both sides are exposed).

The Qpid GUI that I recently posted info on exposes all of this and it's pretty easy to see most things one is likely to care about.

If you need to look at this in your own code you might want to take a look at a posting I sent in reply to Lance D. on the topic of "Instrumenting the Broker" (around the 11th of January). I posted him a couple of python programs I'd written (connection-logger and connection-audit) those illustrate how to get connection info (plus a load else) out of the broker via QMF. The might well help you get up and running.

HTH,
Frase



On 26/01/13 16:16, sys8284 wrote:
HI

How can i get the sender port  number i.e .., the port from which the AMQP
Message is sent from Source Computer

I know the destination port as 5672. But i need the origin port number



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/Amqp-message-sender-port-tp7587517.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to