@@ -171,12 +171,12 @@ class MessageProperties:
171
171
reply_to_group_id: Id for sending replies to a specific group.
172
172
"""
173
173
174
- message_id : Optional [Any ] = None
174
+ message_id : Optional [Union [ int , str , bytes ] ] = None
175
175
user_id : Optional [bytes ] = None
176
176
to : Optional [str ] = None
177
177
subject : Optional [str ] = None
178
178
reply_to : Optional [str ] = None
179
- correlation_id : Optional [Any ] = None
179
+ correlation_id : Optional [Union [ int , str , bytes ] ] = None
180
180
content_type : Optional [str ] = None
181
181
content_encoding : Optional [str ] = None
182
182
absolute_expiry_time : Optional [datetime ] = None
@@ -307,10 +307,9 @@ def _filter_message_properties(
307
307
filter_prop : Dict [symbol , Any ] = {}
308
308
309
309
for key , value in message_properties .__dict__ .items ():
310
- if key is not None :
311
- if message_properties .__dict__ [key ] is not None :
312
- # replace _ with - for the key
313
- filter_prop [symbol (key .replace ("_" , "-" ))] = value
310
+ if value is not None :
311
+ # replace _ with - for the key
312
+ filter_prop [symbol (key .replace ("_" , "-" ))] = value
314
313
315
314
if len (filter_prop ) > 0 :
316
315
self ._filter_set [symbol (AMQP_PROPERTIES_FILTER )] = Described (
0 commit comments