Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting property absolute_expiry_time caused send to fails #153

Open
tonygleck opened this issue Apr 9, 2020 · 1 comment
Open

Setting property absolute_expiry_time caused send to fails #153

tonygleck opened this issue Apr 9, 2020 · 1 comment

Comments

@tonygleck
Copy link

  • UAMQP Package Version: uamqp-1.2.6
  • Operating System: Linux Ubuntu 18.04
  • Python Version: 3.7

Describe the bug
When I set the absolute_expiry_time on a message property I get a failure, if I remove the setting of absolute time and set a different property it works correctly.

To Reproduce
Steps to reproduce the behavior:
Run the following script:

import uamqp
import time
from uuid import uuid4

device_id = "<device_id>"

target = "<target here>"
amqp_client = uamqp.SendClient(target)

msg_content = "Test Message"
msg_props = uamqp.message.MessageProperties()
msg_props.message_id = str(uuid4())
msg_props.to = "/devices/{}/messages/devicebound".format(device_id)

send_message = "Sending c2d message 4"
msg_props.absolute_expiry_time = int(time.time() + 3600)

print("Sending Message")

message = uamqp.Message(
    msg_content, properties=msg_props
)
amqp_client.queue_message(message)
results = amqp_client.send_all_messages(close_on_done=True)
if uamqp.constants.MessageState.SendFailed in results:
    print("C2D message send failure")

Let me know if I'm missing something here.

@yunhaoling
Copy link
Contributor

hey @tonygleck , apologize for the delayed response.

thanks for you detailed instruction to reproduce, may I ask:

  1. are you sending message to Azure IoTHub?
  2. would you be able to turn on networking tracking and enable logging to see if there's any error happening during the sending process? that would be:
import logging
logging.basicConfig(level=logging.INFO)

amqp_client = uamqp.SendClient(target, debug=True)

it would be helpful and convenient for us to debug if you could paste the log here :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants