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

JMS: Swallow IBM MQ exception #3167

Merged
merged 2 commits into from
Apr 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
package akka.stream.alpakka.jms.impl

import java.util.concurrent.ArrayBlockingQueue

import akka.annotation.InternalApi
import akka.stream.alpakka.jms.{Destination, DurableTopic}
import akka.util.OptionVal
import javax.jms

import javax.jms
import javax.jms.JMSException
import scala.annotation.tailrec
import scala.concurrent.{ExecutionContext, Future}

Expand Down Expand Up @@ -99,6 +99,8 @@ private[jms] final class JmsAckSession(override val connection: jms.Connection,
try {
if (session.getAcknowledgeMode() == jms.Session.CLIENT_ACKNOWLEDGE)
drainAcks()
} catch {
case ex: JMSException if ex.getMessage != null && ex.getMessage.contains("JMSCC0033") => // Swallow as ack isn't necessary if this is being thrown
} finally {
ackQueue.put(Left(SessionClosed))
session.close()
Expand Down