New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARTEMIS-1365 Advisory consumers listed in Console #1647
Conversation
Howard, This just turns off advisories completely from a management pov, we should have a switch to turn them off or on as well |
Also you need to make sure that the JMX objects aren't created at all for both addresses and queues |
As a user if a remote client attaches to advisory or management addresses we would like to still see those so if something goes rogue we know what is attached. As such i agree with Andy having this shown or not should be toggle-able. Also another note, but it seems AddressInfo should have a boolean field 'isInternal' to denote if it is an internal address, that can be set by the OpenWire protocol on creation of the address rather than building protocol logic into the server modules outside the protocol layers. Im discussing this section: "public class AddressInfo { //from openwire that was recently added in #1587 Also a query not related to this PR, but from my understanding advisories are very much like management notifications, yet i don't see it tapping into that feed to make the advisories? |
@@ -130,6 +130,10 @@ public String toString() { | |||
} | |||
|
|||
public boolean isInternal() { | |||
return this.name.startsWith(ADVISORY_TOPIC); | |||
return isInternal(this.name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a boolean field internal, that is set by the protocol layer, we shouldn't have protocol specific bits in the core models.
return isInternal(this.name); | ||
} | ||
|
||
public static boolean isInternal(SimpleString address) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be needed should be an attribute on the AddressInfo
@andytaylor @michaelandrepearce guys agreed please don't merge, I'm making more changes now. |
@gaohoward ill take the question part to dev mail probably should have done it in first place. And just concentrate on pr details here |
Guys, so I added a parameter to OpenwireProtocolManager, named supportAdvisory. If set to false, no advisory addresses/queues will be created. Default is true. |
As long as the JMX objects aren't created they won't appear on the console,
I would have a flag to disable them completely and one to hide them by not
creating JMX objects
…On 9 November 2017 at 09:35, Howard Gao ***@***.***> wrote:
Guys, so I added a parameter to OpenwireProtocolManager, named
supportAdvisory. If set to false, no advisory addresses/queues will be
created. Default is true.
However I'm not sure about the Console. When supportAdvisory is true, I
would still want to hide the JMX objects (not register them but stored them
in a list) so that the Console user won't be bothered by them. I think
there should be a way to let the user to view those objects, may be adding
one operation to the management api? I'm not sure, what you guys think of
it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1647 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAt5svcGhiQjgyI_ryuUzJlDcVWlxz_Mks5s0sdIgaJpZM4QUPS5>
.
|
ok, make sense to me. |
Still would like the logic to sit within openwire protocol to set an address to internal and not within core classes, addressinfo should just hold a Boolean flag of if it should be treated as internal address or not, this way if future cases the logic is held only in the specific protocol |
@andytaylor / @mtaylor this is an area of your expertise.. I will let you guys merge this one. |
@michaelandrepearce I'll find a way to remove the protocol specific from addressInfo. |
02585ea
to
3041a84
Compare
I'll update this again. (Adding some doc about the newly added properties) |
bf5a323
to
6dc53af
Compare
@mtaylor @michaelandrepearce guys I think it's ready for review now. Thanks! |
do we need to move the AddressInfo class? |
@andytaylor got a simple way to keep the AddressInfo. will upload soon after local test check. |
6dc53af
to
d6c30eb
Compare
@andytaylor I've made changes to keep AddressInfo in its original package. can you take a look at it? |
looks ok to me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t see any update in the code to persist the extra field so it’s kept in restart.
Like wise I don’t see any way of configuring this in broker xml. (this one could be done later as separate pr)
Also a few left over system outs
@@ -316,6 +316,7 @@ private void validateRoutingTypes(SimpleString addressName, Collection<RoutingTy | |||
if (binding instanceof QueueBinding) { | |||
final QueueBinding queueBinding = (QueueBinding) binding; | |||
final RoutingType routingType = queueBinding.getQueue().getRoutingType(); | |||
System.out.println("got a queue binding........... " + queueBinding.getQueue().getName() + " rt: " + routingType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be removed
@@ -1221,6 +1240,7 @@ public Response processWireFormat(WireFormatInfo command) throws Exception { | |||
public Response processAddDestination(DestinationInfo dest) throws Exception { | |||
Response resp = null; | |||
try { | |||
System.out.println("___adding dest: " + dest); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be removed
@michaelandrepearce it is configured in the broker.xml file via the acceptor url so Im fine with that, dont think we need to persist it. Im happy to merge this. |
@andytaylor can we remove the sysouts before merging. |
@michaelandrepearce yes, I will wait before merging |
Openwire clients create consumers to advisory topics to receive notifications. As a result there are internal queues created on advisory topics. Those consumer shouldn't be exposed via management APIs which are used by the Console To fix that the broker doesn't register any queues from advisory addresses. Also refactors a code to remove Openwire specific contants from AddressInfo class.
d6c30eb
to
5fe88e1
Compare
Sorry about the System.out, I've remove them. |
@gaohoward thanks for all the changes, appreciate the effort, great work. +1 from me. |
Thanks @michaelandrepearce, great help! |
Openwire clients create consumers to advisory topics to receive
notifications. As a result there are internal queues created
on advisory topics. Those consumer shouldn't be exposed via
management APIs which are used by the Console
To fix that the broker doesn't register any queues from
advisory addresses.