Re: Can I expose Java properties set in the Qpid broker server via JMX or the REST API?

2018-12-20 Thread Robbie Gemmell
I dont know about the more general question (but I see Alex answered
before I finished this), though on this item specifically...

What you are asking about is from an MBean created by the JVM within
its Platform MBeanServer, so the broker itself actually has nothing to
do with it. If you fired up two instances of JConsole and connected
one to the other you would see the same MBean listed.

Robbie

On Wed, 19 Dec 2018 at 22:18, Brian O'Shea  wrote:
>
> Looking at jconsole (connected to the running Qpid broker), it appears that
> it exposes a Map under java.lang -> Runtime -> Attributes ->
> SystemProperties.  Is this something that I can depend on always being
> available?  This is Qpid version 7.0.6, which no longer supports management
> over JMX, but will this attribute always be accessible over JMX?
>
> Thanks,
> Brian O'Shea
> Salesforce
>
>
>
> --
> Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> -
> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
> For additional commands, e-mail: users-h...@qpid.apache.org
>

-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: Can I expose Java properties set in the Qpid broker server via JMX or the REST API?

2018-12-20 Thread Oleksandr Rudyy
Hi Brian,

You can add a suffix to the Apache Qpid version which is exposed via
Broker attribute 'productVersion'.
For example, if version of Qpid Broker is 7.0.6 and suffix is set to
'MY-CORP-1.3', the product version would be '7.0.6;MY-CORP-1.3'.
This can be achieved by adding into broker lib folder (classpath) a
jar with a file 'qpid-common.properties' containing property
'qpid.version.suffix'. For example,

qpid.version.suffix=MY-CORP-1.3

Thus, with every internal broker release/build you can generate
qpid-common.properties with your company version which would ne
available via prefix of productVersion attribute.
This approach is used in a company I am working for.

Alternatively, you can try to create a context variable with a value
set to your company version. The context variable can be set as
environment property,  JVM system property, specified in file
'system.properties' available in classpath, set as command line
argument (for example, '-prop my.company.version=1.2.3' ) or set in
initial  configuration broker context attribute. However, the context
variables can be modified/overridden via REST API and can be
mistakenly changed when broker is running which makes this approach
unreliable.

By default, the context variable not set directly on the configured
object (for instance, the ones injected via JVM system properties
including variables specified in file 'system.properties' ) are not
returned in REST API responses.
In order to see them, you need to call REST API with a parameter
'excludeInheritedContext=false'. (For example,
https://localhost:8443/api/v7.0/broker?excludeInheritedContext=false)

Kind Regards,
Alex

On Wed, 19 Dec 2018 at 22:18, Brian O'Shea  wrote:
>
> Looking at jconsole (connected to the running Qpid broker), it appears that
> it exposes a Map under java.lang -> Runtime -> Attributes ->
> SystemProperties.  Is this something that I can depend on always being
> available?  This is Qpid version 7.0.6, which no longer supports management
> over JMX, but will this attribute always be accessible over JMX?
>
> Thanks,
> Brian O'Shea
> Salesforce
>
>
>
> --
> Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> -
> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
> For additional commands, e-mail: users-h...@qpid.apache.org
>

-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: Can I expose Java properties set in the Qpid broker server via JMX or the REST API?

2018-12-20 Thread Rob Godfrey
Hi Brian,

On Wed, 19 Dec 2018 at 23:18, Brian O'Shea  wrote:

> Looking at jconsole (connected to the running Qpid broker), it appears that
> it exposes a Map under java.lang -> Runtime -> Attributes
> ->
> SystemProperties.  Is this something that I can depend on always being
> available?  This is Qpid version 7.0.6, which no longer supports management
> over JMX, but will this attribute always be accessible over JMX?
>
>
These JMX attributes are expose by the Java Runtime itself rather than
being in any way tied to Qpid.  As such I believe you can rely on their
availability.

-- Rob



> Thanks,
> Brian O'Shea
> Salesforce
>
>
>
> --
> Sent from:
> http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> -
> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
> For additional commands, e-mail: users-h...@qpid.apache.org
>
>


Re: Can I expose Java properties set in the Qpid broker server via JMX or the REST API?

2018-12-19 Thread Brian O'Shea
Looking at jconsole (connected to the running Qpid broker), it appears that
it exposes a Map under java.lang -> Runtime -> Attributes ->
SystemProperties.  Is this something that I can depend on always being
available?  This is Qpid version 7.0.6, which no longer supports management
over JMX, but will this attribute always be accessible over JMX?

Thanks,
Brian O'Shea
Salesforce



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Can I expose Java properties set in the Qpid broker server via JMX or the REST API?

2018-12-19 Thread Brian O'Shea
Hello Qpid maintainers,

My organization uses Qpid, and we occasionally deploy configuration changes
that we track using a build number that we generate internally.  We would
like to find a way to expose this build number so that our application can
access it to see what "build" the Qpid broker is (this is not the Qpid
version number, and only has meaning to our organization).  Ideally we would
access it via the REST API, but I realize that this might not be feasible. 
Can you think of a way that I can store this build number in the broker
somehow that can be accessed remotely?

Thanks.  Let me know if you need clarification.

Brian O'Shea
Salesforce




--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org