title: How do I create a spring boot listener for azure service bus FIFO queue?
body: <p>I am trying to write a listener for azure service bus queue, but the messages aren't being pulled. The sender is working, so I know it's not a networking issue. The messages are being sent with a sessionId for FIFO, which I believe is causing the issue. Perhaps it requires more code for the listener, or a custom listener factory. However, I have been unable to find a reference for creating a FIFO listener.</p>
  
  <pre><code>@JmsListener(destination="request", containerFactory = "jmsListenerContainerFactory")
  public void onMessage(String message) {
      try {
          log.debug("Azure message received: {}", message);
          myService.process(message);
      } catch (Exception e) {
          log.error("Exception while processing message: {}", message, e);
      }
  }
  </code></pre>
  
  <p>application.yml:</p>
  
  <pre><code>spring:
    jms:
      servicebus:
        connection-string: Endpoint=sb://myapp.servicebus.windows.net/;SharedAccessKeyName=enable_access_from_resource_group;SharedAccessKey=&lt;mykey&gt;
        idle-timeout: 30000
  azure:
    servicebus:
      queue-receive-mode: peeklock
      queue-name: myqueue
      connection-string: Endpoint=sb://myapp.servicebus.windows.net/;SharedAccessKeyName=enable_access_from_resource_group;SharedAccessKey=&lt;myKey&gt;
      allow-telemetry: false
  </code></pre>
  
  <p>messaging.tf</p>
  
  <pre><code>resource "azurerm_servicebus_namespace" "alpha" {
    name                = "myapp"
    location            = azurerm_resource_group.k8s.location
    resource_group_name = azurerm_resource_group.k8s.name
    sku                 = "Standard"
    tags = {
      app = var.cluster_name
    }
  }
  
  resource "azurerm_servicebus_queue" "request" {
    name                         = "request"
    resource_group_name          = azurerm_resource_group.k8s.name
    namespace_name               = azurerm_servicebus_namespace.alpha.name
    enable_partitioning          = false
    requires_duplicate_detection = true
    requires_session             = true
  }
  </code></pre>