Not able to receive message as a batch from the channel subscribed using aiosfstream, Python library for salesforce - apache-kafka

I am trying to subscribe to a salesforce channel, I was able to get the messages from the channel.
But the issue is I am getting the messages one after another, the expected way of receiving is when bulk messages are published to the channel. Need to get the messages as a whole in the subscriber.
Let's say if I publish 500 messages, I need to get whole 500 messages here on the subscriber. But I am getting one message after another.
I am using the following code
async with client:
for topic in get_topics(system='salesforce'):
await client.subscribe(topic)
async for message in client:
messages = message
The above code is called inside async function
I am not sure this a bug from library or the method I follow is wrong
please let me know what is the issue.

I was able to figure out this Issue,
It is not related to library, it is super awesome. I was able to get the message real time.
The issue was with the architecture I have currently, which is causing the delay.
Thank you all for the help.
I see like it is not so good to answer this way, but answering it so that it might give someone heads up. While looking for such errors.
They can easily start debug the architecture instead of the library.

Related

Problem using signalr for chat application flutter

I had made a whole chat application using signalr as a socket with the online and offline facility. I am facing a few problems,
Signalr connection is always time out after some time, to overcome that I had condition if hubconnection is not connected then create new hubconnection (onResume app), but still it get hubconnection._callback got increased when sending message and not moving to server side socket. Again need to refresh whole app.
Can someone tell me whether this is problem because there are lot of operations going on and so signalr loses its connection as flutter is single thread and it cannot handle much? or should I use Isolate or inherit widget.
Summary problem:
I cannot send message in chat after sometime. It stores all message in hubconnection._callback and not going for server.
Is anything better solution to keep alive in both Android+iOS.
I had used https://pub.dev/packages/signalr_netcore package.
Please do not mention about firebase.
Any other logic suggestion is appreciable.
Thank you.
I've been using a different package, https://pub.dev/packages/signalr_core, which works fine without any particular issues what I have observed at the moment.
I'm only running about 10 listeners simultaneously, not sure if that is more or less than you. In the package I'm running you can establish connection with automatic reconnect. It looks like this:
HubConnectionBuilder().withAutomaticReconnect().withUrl(....)
It seems like your package have the same functionality... Have you tried that?

Kafka streams Deserialisation exception| Log and continue e

I am facing the same issue as
Kafka Streams Deserialization Handler
After using logandcontinue, still on restarting server the corrupt messages show up everytime.
It looks like this jira issue is still open and needs to be addressed to fix the problem you are describing: https://issues.apache.org/jira/browse/KAFKA-6502
It only happens when you have a series of records in error though. As soon as you have a good record coming in, the offset moves along. Therefore, as a workaround, you can probably send a good record that will not cause an error maybe?

Coffescripts not receiving data from broadcasted message relay job

Here's the code:
How to ensure the javascripts/channels/chatrooms.coffee is loading and receive: (data) works? Console.log data is not loading
I posted the problem the other day. It comes from a tutorial, but somewhere after continuing work on my project, I'm not sure where the bug came up,
But the message relay job posts on the server, and my config.yml has redis with redis up and running.
There have been similar bugs, but I've worked through those solutions and it's not enough. The received: (data) console log doesn't arrive in the js console of the browser.
The App subscriptions seem to all be in order according to the tutorial, I bet it's a really simple fix.
My messaging system still works, so it's not crucial to the project, but it's a difference of having the chat system work in realtime versus with a 4 second page-refresh delay.
The last problem I had was not including jquery for my other coffeescripts, so I'm guessing the channels coffeescripts is probably a one line fix.

CQRS/EventStore: How are failures to deliver events handled?

Getting into CQRS and I understand that you have commands (app layer) and events (from the domain).
In the simple case where events are to update the read model, do read model updates fail? If there is no "bug" then I cannot see them failing and as I am using EventStore, I know there is a commit flag which will retry failures.
So my question is do I have to do anything in addition to EventStore to handle failures?
Coming from a world where you do everything in one transaction and now things are done separately is worrying me.
Of course there may be cases where a published event will fail in the read models.
You have to make sure you can detect that and solve it.
The nice thing is that you can replay all the events again and again so you have the chance not only to fix the error. You can also test the fix by replaying every single event if you want.
I use NServiceBus as my publishing mechanism which allows me to use an error queue. Using my other logging tools together with the error queue I can easily determine what happened since I have the error log and the actual message that caused the error in the first place.

Handling received messages iphone

I have got a proj work, which works in this way...
An app which connects two guys, I'm able to send a message and the other one receives it in his message inbox. Can't there be done something such that, the sent message can be read inside my application?
I have found out some ways, like using push notifications, using sqlite. Kindly suggest me which one works out well.
Thanks in advance.
I will choose push notification to implement. But in this implementation lot of server side code has to be implemented. So my suggestion is to go through the docs and check that all your requirements are fulfilled.
For more info: http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12 and http://mobiforge.com/developing/story/programming-apple-push-notification-services
The above URLs have the implementation code and profiling. The below one will give you a proper understanding of push notification.
https://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html.