Several page.count in my Microsoft Graph Subscription - c#

i'm subscribed to an email resource to get new emails notifications, this is what is happening.
When i get a message i got a notification inside that notification and has page.count in this case is one. BUT if receive two emails at the same time i will get two notifications with page.count=2 so my question is;
If i get one email, Shouldn't I receive inside that notification one email and in the other notification the other email so in every notification the page count is always 1?? I'd appreciate your answers:) greetings.

This is expected behavior, I am not sure which code you are using, but you should use #odata.deltaLink OR #odata.nextLink to have controlled behavior of what you want to read.
Let me know if this answers your question.

Related

Determine the number of times a message has been on the Azure Topic

I currently have an azure service bus topic that I'm subscribed to and want to implement retry logic based on the number of times a message has been on the topic. Is there a method in the Microsoft.Azure package that provides us with this information? Do I need to configure the message that is received by the C# service bus subscriber client to send that information? Do I need to change anything on the topic itself?
You can use the Message.SystemProperties.DeliveryCount property for that:
Number of deliveries that have been attempted for this message. The count is incremented when a message lock expires, or the message is explicitly abandoned by the receiver. This property is read-only.
(source)
If you ever switch to the newest SDK, Azure.Messaging.ServiceBus, it is the ProcessMessageEventArgs.Message.DeliveryCount property, see the docs

How to map incoming messages to a consumer group in Azure Eventhub

I am trying to use Azure EventHub in order to process messages and it works fine as long as I have one sender and one consumer.
I simple make my consumer listen to a specific Consumer Grooup and all is fine
Now the problem is when I send different types of messages that I want processed by different Consumer Group I dont see how that can be done
I am creating my sender like this
private static EventHubProducerClient eventHubClient = new EventHubProducerClient(eventHubConnectionString, eventHubName);
But I find no way to tell it what Consumer Group it should send to, it simple sends to hub itself and that hub has multiple resource groups
How do I decide what consumergroup gets this message?
I googled for hours without finding the way to "map" input messages from specific senders to a specific output Consumer Group
You cannot specify which message is sent to a specified Consumer group. Messages are sent to partitions, partitions are all included in each consumer group, you can check the diagram in this doc. The screenshot as below:
Now for you question: when I send different types of messages that I
want processed by different Consumer Group I dont see how that can be
done.
As a workaround, when you send messages, you can specify a property for each message. When read these messages from consumer group, you can also use the property to determine if you want to process it or abandon it.
Hope it helps.

Context.Wait() isn't triggered by an attachment

[Update] I verify another thing and it appears that my bot, hosted in Azure, just doesn't accept anymore any kind of attachment...
I just update to the 3.81 version of the Bot Framework and one thing isn't working anymore.
I expect from the user to send either a text or an attachment. So I wait for the response with context.Wait(waitForAnswer)
But the method waitForAnswer doesn't trigger if the user sends an attachment... Now if I want to receive one, it seems that the only way is using PromptDialog.Attachment... but this isn't fine for my use case because I don't know if the user will send an attachment or a simple text message.
Note that within the emulator, the function waitForAnswer is correctly triggered by an attachment... But when I try to use Telegram channel or simply the webchat, problem rise

Notification on sent out email using EWS

I have done streaming notification on new arrival email but when ever user send any email to anyone, Can it generate any event though streaming, pull, push notification. I am trying to track each and every email body that is being sent out from account.
There is no Send notification that gets fired however when a user sends an email the default behaviour is to save a copy in the SentItems folder so if you subscribe to the CreateItem event on the SentItems folder that should probably cover what your trying to do (you can test that without writing any code using the EWSEditor).
You can configure the Email Client to not save a copy in the SentItems folder and if the user is trying to hide something they may delete it before you can get at it. Transport Agents or Jornaling should be used when you need to do this kind of thing for auditing/compliance reasons because it ensure you always capture the message.

Detect auto reply emails programmatically

I have scenario where I would have to track the delivery of the emails I send programmatically and flag those recipients who have set either 'Out of Office" OR have the message delivery failed due to over-sized inbox OR if their email ID doesn't exist. Such instances usually send out automated replies. How can I track them? Does .NET (System.Net.Mail) offer any APIs to do it?
There's no set of checks for auto-responses that produce perfect behavior (detect all auto-replies with no false positives), but the following checks have worked well so far:
header Auto-Submitted with value other than no (see RFC
3834)
headers X-Autoreply or X-Autorespond with any value
header Precedence with value auto_reply
I don't yet have any advice for detecting message delivery failure notifications.

Categories