I am using sockets machine pack in treeline to subscribe and broadcast messages to particular rooms.
But, i am struggling to get it running by subscribing to a room and sending messages to a particular room. As, when using 'join room' machine. it asks for unique socket ids and whenever i try to get the socket ids from 'getRequestingSocketId' it throws a 500 error. Any help would be deeply appericiated!
I created two routes:
POST /subscribe
POST /senddata
To subscribe to a room
I pass a parameter {roomid: 'room'} with the url /subscribe to subscribe the user to the 'room' room. It asks for a unique socket id here, but when i use 'getRequestingSocketId' it throws the 500 error, when calling the api.
and /senddata is used to send data to that particular room later, here: 'room' room
P.S. I used a common event name to try to send the data
Can you please help me with how to setup socket subscriptions to send data using treeline please ?
Thank you!
Related
I was about to start developing my companies website which is currently in research phase. I was researching with the Aweber API (https://api.aweber.com/) but did not find the API for using a send mail function.
I came across Create Broadcast API here
https://api.aweber.com/#tag/Broadcasts/paths/~1accounts~1{accountId}~1lists~1{listId}~1broadcasts/post
but this requires a list to be used I want to send email to individual contact in the list separately. Any help would be appreciated.
AWeber's API can only send broadcast messages to a list, or a previously created segment of subscribers. You cannot send messages out to a single person solely using the API.
You could use the web UI to create a segment of "email address is ...", then get the segment and send the message to it using the API, but that requires an extra step.
I am using a streaming subscription (EWS Managed API) to subscribe to events on one mailbox. Now, instead of doing this directly, I want to subscribe and take action on incoming mails on these mailboxes through impersonation.
How to achieve it?
What I have Tried:
I did setup multiple streaming subscriptions using service.ImpersonatedUserId() but when i get a event(i get events successfully for the 2 mailboxes i have subscribed to) and try to take some action for e.g EmailMessage.Bind(Item Id) or Folder.Bind(), the code stucks! I dont get any error message. I even tried TraceEnabled= true, I found nothing!
I did see this MSFT link but didn't find an answer.
I need help with for e.g moving the mail to another folder for multiple mailboxes through EWS subscriptions.
The default concurrent connection limit in .net is 2 by default https://learn.microsoft.com/en-us/dotnet/api/system.net.servicepointmanager.defaultconnectionlimit?view=netframework-4.7.2 because Streaming notifications require a concurrent connection to work this is a common issue.So all you should need to do is set the connection limit higher eg
System.Net.ServicePointManager.DefaultConnectionLimit = 100;
I am implementing an Angular client that connects to a spring boot backend via STOMP.
When a client connects and wants to create a "business-group", said group is created in the backend and gets a UUID; and from that moment on other clients should be able to send to and receive messages from that group.
So I am creating a topic with said business-group id in the destination - something like
#MessageMapping("/foo/group/{id}")
However I want the creator of the group to immediately receive the business group id to be able to subscribe to it himself as well. And to be able to share the id with others (user to user).
I have used raw sockets for this before, so I was able to just use the connected user's session and then send back the id to him after the had sent the create-message. But since the session handling was business-group-ID based (so that only the users in a specific group receive the messages from that group), the whole dividing user sessions by business-group-ID had to be done manually and I was looking to upgrade this to something that does that handling for me.
However I am not sure how to achieve this with spring stomp. So my question is, is there a way for the creator of such a group to immediately receive the id as an answer/response to his initial "request"?
Because he can't subscribe to anything before he receives the group id.
Background:
It's basically like a chat app where a user can create a group/chatroom and then share it with others (via URL - which contains the ID); everyone that subscribes to it can then receive msgs from it and send msgs into it. But to do so the creator first needs the created ID.
I found a solution. This can be done via #SendToUser
#MessageMapping("/group.create")
#SendToUser(value="/topic/group.create", broadcast=false)
public Response createGroup(#Payload Message message) {
...
return createResponseWithId();
}
On the other end you only need to subscribe to '/user/topic/group.create'.
I have built an app that sends out an SMS using the twilio number(the one assigned to me) when a message is sent I receive the SID number which is inserted into the db, along with some other general information, however I do not know how to connect the received SMS SID to the sent SMS SID that tells the system that user has responded....how does someone connect the outgoing message to what is received?
UPDATE:
Hello Devin, Thanks for the response! however, this does not help me much as I might send lets say one of three different people multiple messages in an hour.
my app is a notification app...basically it is a form that a user fills out with some basic info. one of these fileds they choose is a drop down of three different people(who the message will go to) they send the message. my app then inserts the form data explained above along with the SMSID that is returned by you guys into a DB.
the user(one of the three people descibed above) that was sent the notification above responds to the message, meaning that Twilio hits my "Request URL" and I save all the information that is returned by the user...however, and where the problem actually lies is that the SMSID for that reply is not the same as the SMSID of the sent notification...therefore I have no way to connect the SMS that was sent to the user with their response. I have looked at the cookies option and that is not what I am needing...actually your documentation actually acknowledges this issue but does not offer a solution as seen here under "Application Initiated Conversations"
https://www.twilio.com/blog/2014/07/the-definitive-guide-to-sms-conversation-tracking.html
So if you know of a way around this, I would love to hear it for sure :)
Twilio evangelist here.
The SMS protocol has no concept of a "conversation". Each message sent is unique and has no knowledge of messages sent before or after it. Twilios SMS Sid is simply a unique identifier for an individual message.
The typical way to solve this is to use the To/From phone number pair as the unique identifier of an SMS conversation. When you send your first outbound message, store the To/From phone number in your database. When the user replies Twilio will tell you what number they sent the message to and from and you can use that information to look up the original outbound message in your database.
If a "user" can be involved in several different conversations at once you either need to use a unique phone number for each seperate conversation (allowing you to use the technique above), or you need to have the user include some type of conversation ID in their reply (which you can use as the unique identifier).
You can buy a pool of numbers and as each conversation "ends", recycle the number for a new conversation.
Hope that helps.
I use autobahnPython + autobahnJs set up a chatting service.
Now I want to a function, when a client connect wamp, the member list of chatting room be updated automatically. How implement this function?
def onSessionOpen(self):
I think in onSessionOpen function add action, but I don't know how to do next.
One approach would be: have a dedicated PubSub topic per chat room. When a WAMP client subscribes to a "chat room topic", it'll be automatically added to the subscriber list for that chat room. The subscriptions are held in self.factory.subscriptions[<topic URI>]. Please note that the latter is an internal object .. not a public API. We would need to know more what else you want to do .. i.e. have an RPC to get the current subscribers on a chat room and such.
Disclaimer: I am author of WAMP, Autobahn and work for Tavendo.