[ 
https://issues.apache.org/jira/browse/QPID-8692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17945430#comment-17945430
 ] 

Vijay Danda commented on QPID-8692:
-----------------------------------

The messages are deleted due to being dequeued. There are 10 
concurrentConsumers. I attached detailed log of our run in file 
qpid-complete-run.log. The only weird messages we see is about Suspension. See 
the end of attached file. But we are not sure what would cause this or If it 
would cause a roll back in derby. 
{code:java}
2025-04-16T14:02:59,954Z INFO  [IO-/127.0.0.1:39656] (q.m.s.state) - [IO Pool] 
[sub:10(vh(/0|14|qpid-jms:receiver:ID:9d09678a-9f15-401c-8161-2a1f83357952:1:12:1:email-queue)/qu(0|14|qpid-jms:receiver:ID:9d09678a-9f15-401c-8161-2a1f83357952:1:12:1:email-queue)]
 SUB-1003 : Suspended for 30,001 ms
2025-04-16T14:02:59,954Z INFO  [IO-/127.0.0.1:39656] (q.m.s.state) - [IO Pool] 
[sub:12(vh(/0|15|qpid-jms:receiver:ID:9d09678a-9f15-401c-8161-2a1f83357952:1:16:1:email-queue)/qu(0|15|qpid-jms:receiver:ID:9d09678a-9f15-401c-8161-2a1f83357952:1:16:1:email-queue)]
 SUB-1003 : Suspended for 30,001 ms{code}
Regarding restart, only when QPID encounters java.sql.BatchUpdateException QPID 
restarts on its own. The exception will happen during the next run and QPID 
tries to insert in to QPID_QUEUE_ENTRIES.

> [Broker-J] Failed to enqueue messages caused by duplicate key value in on 
> 'QPID_QUEUE_ENTRIES'
> ----------------------------------------------------------------------------------------------
>
>                 Key: QPID-8692
>                 URL: https://issues.apache.org/jira/browse/QPID-8692
>             Project: Qpid
>          Issue Type: Bug
>          Components: Broker-J
>    Affects Versions: qpid-java-broker-9.2.0
>         Environment: java version : openjdk 21.0.6 2025-01-21 LTS
> Red Hat Enterprise Linux 8.10
> qpid broker: qpid-broker-9.2.0
>            Reporter: Vijay Danda
>            Priority: Major
>         Attachments: derby_logs_message5119.txt, qpid_log.txt
>
>
> Use case: We use Qpid instance to drop email messages in to the queue. 
> Clients would connect to qpid instance, reads those email messages and sends 
> it to SMTP server.
> Issue: When sending emails on second day, we saw the following error in qpid 
> logs
> {code:java}
> java.sql.BatchUpdateException: The statement was aborted because it would 
> have caused a duplicate key value in a unique or primary key constraint or 
> unique index identified by 'SQL200930134600720' defined on 
> 'QPID_QUEUE_ENTRIES'.
>         at 
> org.apache.derby.impl.jdbc.EmbedStatement.executeLargeBatch(Unknown 
> Source){code}
> Complete qpid logs are attached. See qpid_log.txt
> Test case:
> We sent around 5000 email messages. We observed, for each message there is a 
> insert in to QPID_QUEUE_ENTRIES statement and sub sequent delete from  
> QPID_QUEUE_ENTRIES. However, when we connect to database and see 
> QPID_QUEUE_ENTRIES table there are still around 1520 records in the table.  
> If we send more messages the next day, we are running in to above error 
> message. Attached derby_logs_message5119.txt  derby log with trace statements 
> for message id 5119.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to