Anylogic How to queue and process received messages by agents - message

--This post has been edited as #Benjamin has suggested in his answer
I am trying to model peer influence for churn situations. Agents will send messages to their peers depending on different conditions. I have also created a List called MessagesReceived to store received messages.(The number of these messages may be >1).
I have tried processing (i.e. adding the message to a list of received messages) these messages in Connections>OnMessageReceived but although I can access message and sender objects, I don't know how to access the receiving agent there.
what would you suggest in this case?
P.S: variable names and types may be a little different in screenshots but the problem I described here does not come from that.

Please always only ask one question per issue, else it gets too confusing.
So let me answer your first question:
although I can access message and sender objects, I don't know how to access the receiving agent there
You can simply type this. in the code box below and you have access to "yourself". In fact, you do not even need that, simply access the fields from "yourself" here. If you are in an agent with variable myVar, you simply use that.
For the other questions, please open separate issues, see this.

Related

Graylog alerting on specific log occurrence

I have a question on how does one set up an email alert, when a certain error in found in the logs.
So basicly i have this sort of error :
org.postgresql.util.PSQLException: ERROR: missing FROM-clause entry for table "something".
Now when this error, or similar error comes, i would love for graylog to alert certain people so they can react to it, however i have managed to only find information on how you set up alerts when there are too many messages coming through or something like that. If anyone has some experience with this sort of search and notify alert, would be much appreciated.
What version of Graylog are you using?
Have you tried the docs here:
https://docs.graylog.org/en/4.0/pages/alerts.html?highlight=alerts
Set your query, stream, intervals and then select "Filter has results" and it will generate an event each time the query comes up with a match. You can then use a notification to send emails to relevant users.
When you set an alarm, in the "conditions" section you can see there are two options.
One option is to aggregate the occurencies and then trigger the alarm when they reach a treshold, the other option is to just trigger the alarm as soon as there is a single occurency (that you need to define).
I personally used this option and it works fine. I've attached a screenshot of what I see from my graylog, but if you need additional informations, this is the page from Graylog documentation. I think it's very well explained :)
https://docs.graylog.org/en/4.0/pages/alerts.html

Changing messages on Slack

So I'm attempting to change a message in slack through my slackbot at the end of a chain of events. I'm able to change it for the first few instances, but I'm not able to do the very last one. I'm 99% sure that it is because I have reached the 5 interactions limit since I am indeed going through 5 interactions with the user prior to my final message. If this is the case, is there a way to change a message without server responses? I ask because the last message is simply a thank you message to the user for participating. It doesn't actually require any input from data on the server to accomplish. I feel like I read about doing it somewhere, but for the life of me I cannot find it again. Any help or links would be greatly appreciated!
EDIT: The user is interacting with buttons through interactive messages to respond to some questions. The current method of updating messages are with chat.update and setting "response_type": "ephemeral" within the json params that I am sending.
An alternative method to using chat.update is to simply reply with the message to the request from Slack. This will replace the existing message by default. It has no limit that I am aware of, so it solves your problem.
This works great with slash commands and interactive messages.
See here for more details.

Revulytics data not showing in Dashboard

I am using Revulytics SDK to track feature usage and came across the below problem.
I am sending feature usage after properly setting up the SDK configuration etc, using the EventTrack() method like this:
GenericReturn grTest = telemetryObj.EventTrack("FeatureUsage", textBoxName.Text.ToString(), null, false);
This returns OK and usually, I can see the usage data in the dashboard. However, after multiple tests, the data I am sending does not show up on the dashboard.
Can anyone hint me how to debug this? Thanks for any help!
I hit a similar issue when first working with this SDK.
I was able to address this as soon as I understood the following:
There are event quotas for the incoming events;
Event names are used for making the distinction.
So when I was sending dummy test data, it made it there, but when I sent some demo data for stakeholders, it was not showing up.
I think the same happens here. You're getting the event name form textbox.text... Pretty sure that varies every time you run the code.
Here are the things to keep in mind when testing your code:
the server has a mechanism to discard / consider events;
implicitly, it allows first xx events depending on the quota;
if you are sending more than xx events, they will not show up in reports.
So, you must control which events to discard and which to consider (there are a couple of levels you can configure, and based of them you can get the events in various types of reports).
Find the "Tracked Events Whitelist Management". You will be able to control these things form there.
This blog helped me (it is not SDK documentation): https://www.revulytics.com/blog/getting-started-with-usage-intelligence-part2-event-tracking
Good luck!

XMPP, sending one message to thousands of jabberIDs - jabber ends up sending it to only a random part of selected group of JIDs

We've got one 'superuser' account that we use to send messages to selected JIDs. Lets say we've selected ones we want to send a message to, and we got ourselves a huge array of user JIDs (20k at this point). We've got a deamon running in the background sending one message at a time to each user, stopping for a minute after sending 2000 of messages (2500/minute limit). We are using xmpp4r as a client that handles sending messages. Every user has same #xmpp.address. <body> is the same in every message.
Our tigase logs (because thats what we're using), show that the messages did actually hit the jabber server and were sent to appropriate users, one at a time.
The issue we're experiencing is that although everything seemed fine, only a part of users actually got the message. (for example, at one point, considering 100 first messages sent - 1..20 and 91..100 got delivered, the middle 70 did not get delivered at all), we improved couple of things in the meantime but this still might be a clue.
We tried creating an array of 10000 duplicated JIDS (jids of couple of users were duplicated thousands of times), and every single message got delivered (and in the right order).
We already spent a couple of days trying different scenarios and are starting to run out of ideas what might be going wrong.
Got any idea's what we might have missed?
I am form Tigase team. First thing, I recommend to use our online forums as this is where we normally respond to questions. We may not see questions posted here.
Anyway...
There are some details not included in your post.
What do you connect and how? Over standard XMPP connection, over Bosh, something else?
What do you mean by "duplicated JIDs"? How did you duplicate JIDs?
Are all the users for which a message is sent online during the test?
If you can see message in Tigase logs, you should also see what happens to it. Was it submitted to network socket for delivery to a client?
What kind of HW did you use? Is there a chance that the server was overloaded and simply dropped some messages? Seems unlikely if you talk about 100 messages and 70 of them not delivered.
How do you actually know that a message was not delivered and are you sure the client/user was connected at the time?

Twilio Application to call another person if one call fails

I am studying twilio's auto calling functionality for the one of our client.
Requirements:
We are handling software system of our client. And when ever there is error in
the system I need to call specific persons.
I could do above function easily on testing environment using php. But In actual scenario,
I want call on multiple number like if one person is not receiving call I must get call
on second number, third number and so on until one person receives call and understands error.
For the above functionality I have studied "Call Screening " example from site and also
communicate to support person but I didn't get exactly from the conversation.
When I call attempt_call.php from my browser I am getting xml output on browser only not any call.
Please guide me if any ready example is there that can solve my problem.
Thanks and best regards.
Piyush Merja
CallScreening didnt work for me..
I have called to one person and checked for its status if its completed then process terminated or continued to another person

Resources