comless_scott Absent Member.
Absent Member.
359 views

Changes to URL or PORT for event notifications are ignored

I wrote a growing number of applications which use the event notification service.
I call configureEventsRequest to setup the http notifications.

If the admin changes the configuration of my application so the url or port are different,
the next time I call configureEventsRequest, the POA does not seem to observe the new URL or port.
The status code returned is however still 0.

I am looking in the POA console at /eventConfigList?all=1 to see the actual configuration.

I noticed this, so I ended up putting the IP and port in the key to work around it.
The only problem with the work around is that I then miss out on the waiting events for the old key.

Is it intended that you can't change the address or port to be notified at?

Regards,
Scott
Labels (1)
0 Likes
6 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Changes to URL or PORT for event notifications are ignored

Sorry, I am a little unclear of what you are saying / asking.
The event system is based on the assumption that you set up
the event configuration and seldom, if at all, change the configuration.

There are some tables that are not updated until the POA is restarted.

What you are seeing may be the result of the design.
If you could give me a concrete example, I can look into it.

Thanks.
Preston


>>>


> I wrote a growing number of applications which use the event
> notification service.
> I call configureEventsRequest to setup the http notifications.
>
> If the admin changes the configuration of my application so the url or
> port are different,
> the next time I call configureEventsRequest, the POA does not seem to
> observe the new URL or port.
> The status code returned is however still 0.
>
> I am looking in the POA console at /eventConfigList?all=1 to see the
> actual configuration.
>
> I noticed this, so I ended up putting the IP and port in the key to work
> around it.
> The only problem with the work around is that I then miss out on the
> waiting events for the old key.
>
> Is it intended that you can't change the address or port to be notified
> at?
>
> Regards,
> Scott


0 Likes
comless_scott Absent Member.
Absent Member.

Re: Changes to URL or PORT for event notifications are ignor

I was doing calls like this:


<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:d="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:t="http://schemas.novell.com/2005/01/GroupWise/types" xmlns:m="http://schemas.novell.com/2005/01/GroupWise/methods" xmlns:e="http://schemas.novell.com/2005/01/GroupWise/events">
<s:Header>
<t:session>ngl4L5OulPCd6fMe</t:session>
<d:gwTrace>False</d:gwTrace>
</s:Header>
<s:Body>
<e:configureEventsRequest>
<e:events enabled="true">
<e:key>ML-u1.po.dom</e:key>
<e:ipAddress>http://10.211.55.27/api/EventNotification</e:ipAddress>
<e:port>8088</e:port>
<e:http>true</e:http>
<e:definition>
<e:events>
<e:event>FolderItemAdd</e:event>
</e:events>
<e:type>Mail</e:type>
<e:containers>
<e:container>folders</e:container>
</e:containers>
</e:definition>
</e:events>
</e:configureEventsRequest>
</s:Body>
</s:Envelope>

-----

<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header/>
<s:Body>
<gwe:configureEventsResponse xmlns:gwt="http://schemas.novell.com/2005/01/GroupWise/types" xmlns:gwe="http://schemas.novell.com/2005/01/GroupWise/events">
<gwe:status>
<gwt:code>0</gwt:code>
</gwe:status>
</gwe:configureEventsResponse>
</s:Body>
</s:Envelope>



Everything works like this, as long as the IP or port does not get changed.
If they get changed, the next time the program checks the event configuration, it will send a new configuration:


<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:d="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:t="http://schemas.novell.com/2005/01/GroupWise/types" xmlns:m="http://schemas.novell.com/2005/01/GroupWise/methods" xmlns:e="http://schemas.novell.com/2005/01/GroupWise/events">
<s:Header>
<t:session>6_bkHMUgd7juIuLI</t:session>
<d:gwTrace>False</d:gwTrace>
</s:Header>
<s:Body>
<e:configureEventsRequest>
<e:events enabled="true">
<e:key>ML-u1.po.dom</e:key>
<e:ipAddress>http://10.211.55.27/api/EventNotification</e:ipAddress>
<e:port>8089</e:port>
<e:http>true</e:http>
<e:definition>
<e:events>
<e:event>FolderItemAdd</e:event>
</e:events>
<e:type>Mail</e:type>
<e:containers>
<e:container>folders</e:container>
</e:containers>
</e:definition>
</e:events>
</e:configureEventsRequest>
</s:Body>
</s:Envelope>

-----

<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header/>
<s:Body>
<gwe:configureEventsResponse xmlns:gwt="http://schemas.novell.com/2005/01/GroupWise/types" xmlns:gwe="http://schemas.novell.com/2005/01/GroupWise/events">
<gwe:status>
<gwt:code>0</gwt:code>
</gwe:status>
</gwe:configureEventsResponse>
</s:Body>
</s:Envelope>


GroupWise sends a code=0, however if there are events waiting, it ignores the change.
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Changes to URL or PORT for event notifications are ignored

I need some clarification on the sentence:
GroupWise sends a code=0, however if there are events waiting, it
ignores the change.

There is a notification list at the POA.
You have to call getEventsRequest and pass <notify>1</notify> to
be put in the notification list.

When an event happens that would trigger the notification, the
POA sends a notification to the IP address and port specified
in the event configuration in the notification list.
Once the POA sends a notification, it drops that event
configuration from the notification list.

To get put back in the notification list, the application has
to call getEventsRequest and pass <notify>1</notify> in the
request.

Are you just seeing the case, where you don't put the event
configuration back into the notification list?

Also, keep in mind that the notifications are like UDP messages.
The code doesn't check to see if the destination got the
notification message. There are cases where you won't get
notified. You have to implement a grass catcher mechanism.
Periodically, you have to call getEventsRequest to see if
there are some events that you haven't processed yet.

Preston



>>>


> I was doing calls like this:
>
>
> Code:
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:d="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:i="http://www.w3.org/2001/XMLSchema‑instance"
> xmlns:x="http://www.w3.org/2001/XMLSchema"
> xmlns:t="http://schemas.novell.com/2005/01/GroupWise/types"
> xmlns:m="http://schemas.novell.com/2005/01/GroupWise/methods"
> xmlns:e="http://schemas.novell.com/2005/01/GroupWise/events">
> <s:Header>
> <t:session>ngl4L5OulPCd6fMe</t:session>
> <d:gwTrace>False</d:gwTrace>
> </s:Header>
> <s:Body>
> <e:configureEventsRequest>
> <e:events enabled="true">
> <e:key>ML‑u1.po.dom</e:key>
> <e:ipAddress>http://10.211.55.27/api/EventNotification</e:ipAddress>
> <e:port>8088</e:port>
> <e:http>true</e:http>
> <e:definition>
> <e:events>
> <e:event>FolderItemAdd</e:event>
> </e:events>
> <e:type>Mail</e:type>
> <e:containers>
> <e:container>folders</e:container>
> </e:containers>
> </e:definition>
> </e:events>
> </e:configureEventsRequest>
> </s:Body>
> </s:Envelope>
>
> ‑‑‑‑‑
>
> <?xml version="1.0" encoding="UTF‑8"?>
> <s:Envelope xmlns:x="http://www.w3.org/2001/XMLSchema"
> xmlns:i="http://www.w3.org/2001/XMLSchema‑instance"
> xmlns:d="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
> <s:Header/>
> <s:Body>
> <gwe:configureEventsResponse
> xmlns:gwt="http://schemas.novell.com/2005/01/GroupWise/types"
> xmlns:gwe="http://schemas.novell.com/2005/01/GroupWise/events">
> <gwe:status>
> <gwt:code>0</gwt:code>
> </gwe:status>
> </gwe:configureEventsResponse>
> </s:Body>
> </s:Envelope>
>
>
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
>
> Everything works like this, as long as the IP or port does not get
> changed.
> If they get changed, the next time the program checks the event
> configuration, it will send a new configuration:
>
>
> Code:
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:d="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:i="http://www.w3.org/2001/XMLSchema‑instance"
> xmlns:x="http://www.w3.org/2001/XMLSchema"
> xmlns:t="http://schemas.novell.com/2005/01/GroupWise/types"
> xmlns:m="http://schemas.novell.com/2005/01/GroupWise/methods"
> xmlns:e="http://schemas.novell.com/2005/01/GroupWise/events">
> <s:Header>
> <t:session>6_bkHMUgd7juIuLI</t:session>
> <d:gwTrace>False</d:gwTrace>
> </s:Header>
> <s:Body>
> <e:configureEventsRequest>
> <e:events enabled="true">
> <e:key>ML‑u1.po.dom</e:key>
> <e:ipAddress>http://10.211.55.27/api/EventNotification</e:ipAddress>
> <e:port>8089</e:port>
> <e:http>true</e:http>
> <e:definition>
> <e:events>
> <e:event>FolderItemAdd</e:event>
> </e:events>
> <e:type>Mail</e:type>
> <e:containers>
> <e:container>folders</e:container>
> </e:containers>
> </e:definition>
> </e:events>
> </e:configureEventsRequest>
> </s:Body>
> </s:Envelope>
>
> ‑‑‑‑‑
>
> <?xml version="1.0" encoding="UTF‑8"?>
> <s:Envelope xmlns:x="http://www.w3.org/2001/XMLSchema"
> xmlns:i="http://www.w3.org/2001/XMLSchema‑instance"
> xmlns:d="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
> <s:Header/>
> <s:Body>
> <gwe:configureEventsResponse
> xmlns:gwt="http://schemas.novell.com/2005/01/GroupWise/types"
> xmlns:gwe="http://schemas.novell.com/2005/01/GroupWise/events">
> <gwe:status>
> <gwt:code>0</gwt:code>
> </gwe:status>
> </gwe:configureEventsResponse>
> </s:Body>
> </s:Envelope>
>
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
>
> GroupWise sends a code=0, however if there are events waiting, it
> ignores the change.


0 Likes
comless_scott Absent Member.
Absent Member.

Re: Changes to URL or PORT for event notifications are ignor

Preston Stephenson;2498006 wrote:
I need some clarification on the sentence:
GroupWise sends a code=0, however if there are events waiting, it
ignores the change.


I am looking at the list at the post office url:
https://scott-dev-vm:7181/eventConfigList
I thought it shows unprocessed events. This is where I see the old configuration.

The post office url with "all" shows the updated information right away.
https://scott-dev-vm:7181/eventConfigList?all=1

I now also looked at the situation by calling getEventConfiguration for the keys.
It shows the changed information right away too.


There is a notification list at the POA.
You have to call getEventsRequest and pass <notify>1</notify> to
be put in the notification list.

When an event happens that would trigger the notification, the
POA sends a notification to the IP address and port specified
in the event configuration in the notification list.
Once the POA sends a notification, it drops that event
configuration from the notification list.

To get put back in the notification list, the application has
to call getEventsRequest and pass <notify>1</notify> in the
request.


I now added an extra call to this during startup to ensure I don't need to wait for my application's polling to kick in.
I am guessing this is why I originally thought it was not working when being changed.
My code sends notify set with a lowercase true instead of 1. Is that ok?
Will it work if I specify a count of 0? In reality I don't actually need the data at that point.
If not I will call it with a count of 1.


Are you just seeing the case, where you don't put the event
configuration back into the notification list?


I don't know exactly what I am seeing when looking at https://scott-dev-vm:7181/eventConfigList.
All I am sure is that this list shows the old configuration and the column events has a number.
I noticed that the old configuration is no longer shown in this list, if the PO is restarted.

My original post was incorrect in saying that https://scott-dev-vm:7181/eventConfigList?all=1 shows the old configuration. (Sorry)


Also, keep in mind that the notifications are like UDP messages.
The code doesn't check to see if the destination got the
notification message. There are cases where you won't get
notified. You have to implement a grass catcher mechanism.
Periodically, you have to call getEventsRequest to see if
there are some events that you haven't processed yet.


I have a polling process set to check for events on startup, as well as if no event notification was received within the last fifteen minutes.


Preston


Cheers!
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Changes to URL or PORT for event notifications are ignored


Sorry, I try a little more:

You have only been talking about the event configuration list.



There is logic to clean up inactive event configuration records.

During nightly maintenance, the code will check each notification record.

If there hasn't been any activity for the event configuration, the code will

mark that event configuration disabled.

If an event configuration has been disabled for a few more days, the

code will then delete the event configuration.



If an event configuration is disabled, no events will be recorded / saved

when the event happens.



If you select "Show all", the code will list all of the event configurations

stored in the post office, even the disabled ones. The default is to only

show the active ones. When you select the "Show all" link, the link

changes to "Show active".



When you select the "Event Configuration List", it shows the list of

event configurations. The last column "Events" shows the number

of events stored in the database. These are the events that have not

been processed / deleted. You can get and delete the events using

getEventsRequest passing <remove>1</remove>. We get the events

without passing <remove>1</remove>. We explicitly call

removeItemsRequest on the events after we have processed the

events.



You can use the Event Configuration List as a debug tool. If you

see an event configuration that has a lot of events (> 100), that

indicates there is a problem with the software processing that

event configuration.



Note: Having more than 100 events stored for an event configuration

can seriously degrade the performance of the POA. If you have

multiple event configurations with > 100 events for each one, the

POA can grind to a halt. You need to process / remove the event

records as soon as possible.



You can pass true, TRUE, True, or 1 for a boolean in the SOAP requests.



The "SOAP Notification List" link, will show the event configurations

in the notification list. When I said after a notification is sent to the

ip address and port, the event configuration is dropped from the

notification list, I misspoke. The event configuration is not

taken out of the list, but is marked as inactive. The "Date/Time"

column shows the date and time the last notification was sent.

If the configuration is set to send another notification, it will have

an '*' after the date and time.



The SOAP Notification List is a tool to help debug problems. If

an event configuration is not sending notifications, you can look

at this table to see when was the last time a notification was sent.

You can also see if it will be sending a notification.



I'm not sure you can pass a <count>0</count> in getEventsRequest.

The code might return an error. You can pass <count>1</count>

and just not process the event. Of course, you would not send the

<remove> element.



Let me know if I need to clarify things more.



Preston
0 Likes
comless_scott Absent Member.
Absent Member.

Re: Changes to URL or PORT for event notifications are ignor

Hi Preston,

Thanks for the infos. I most of your post matches what I thought.
The real problem I had, was when I changed the configuration, I did not explicitly make a call to activate the notification list.
This would happen eventually when my program polled for new events.

If you select "Show all", the code will list all of the event configurations
stored in the post office, even the disabled ones. The default is to only
show the active ones. When you select the "Show all" link, the link
changes to "Show active".

This did not match my experiences, I spent a while looking into this, and I found the following:

The POA event configuration list without all=1
This shows all configurations which had events at some point since the POA was started, unless the configuration is explicitly removed.
If a configuration is removed, it is removed from the table, it doesn't matter if the application does it, the POA does it during upkeep, or the user does it with a browser on the POA site.
If a configuration is changed, the table will display the original data in the "IP Address" and "Port" columns, this will remain so until the POA is restarted. (This is what was confusing me.)
If I disable an event configuration, it will still appear in this table, if the configuration was enabled and had matching events since the poa was started.
The count in the events column shows the total number of events for that configuration since the POA was started, and has nothing to do with events not processed by the subscriber.
To see if any events weren't processed, you need to use the link on the user id field, and use either the "show events" or "show events by type" functions.

The POA event configuration list with all=1
This shows all currently defined event configurations, as they are currently defined.
This view does not show anything in the events column.

I'm not sure you can pass a <count>0</count> in getEventsRequest.
The code might return an error. You can pass <count>1</count>
and just not process the event. Of course, you would not send the
<remove> element.

I tried this out, it works if I have the key set, the count = 0, notify = true, view = "key".

Another thing I noticed is when a configuration is changed, the old configuration will remain as is from before the change in the notification list.
The changed configuration will appear as a separate entry.

Thanks once again for your help.

Kind Regards,
Scott
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.