When using PostgreSQL to persist messages sent to topics, the message priority is always 0 in the activemq_msgs db, even when it is not set to 0 on send. If the broker goes down before these messages are received and the receiver is filtering messages based on message priority, there is a chance that some of the messages will not reach their intended destination when the messages are recovered.
Is the expected behavior that persistent messages sent to topics will all persist with the JMSPriority property set to 0? Messages set to queues preserve the JMSPriority set on the message producer, so I am curious to know why there is a difference.
That is not correct or expected behavior and it a little unusual because both the topic and queue send/add logic share the same underlying implementation to update the DB. From a priority perspective they should behave identically.
note: that a persistent message sent to a topic is only recorded when there are pending durable subscribers.