Hello @Nayangiri Goswami
The error message suggests that the value of the SequenceNumber
field is '000000000000000001dummy100000004000000000000000000', which is not a valid integer value.
To resolve this issue, you can modify the code of your Azure function to handle this specific case. One way to do this is to extract the numeric part of the SequenceNumber
field and convert it to an integer. Here's an example of how you can modify your code to handle this case:
import logging
import azure.functions as func
def main(msg: func.ServiceBusMessage):
sequence_number = msg.sequence_number
# Extract the numeric part of the sequence number
numeric_sequence_number = int(sequence_number.split('dummy')[0])
logging.info(f'Sequence number: {numeric_sequence_number}')
In this example, we extract the numeric part of the SequenceNumber
field by splitting the string at the dummy
substring and taking the first part. We then convert this numeric part to an integer using the 'int' function. You can then use this integer value in your function as needed. I hope this helps! Let me know if you have any further questions.