@Override public void onMessage(Message message) {
    metrics.incrementMessages();
    byte[] serialized; // TODO: consider how to reuse buffers here
    try {
      if (message instanceof BytesMessage bytesMessage) {
        serialized = new byte[(int) bytesMessage.getBodyLength()];
        bytesMessage.readBytes(serialized);
      } else if (message instanceof TextMessage textMessage) {
        String text = textMessage.getText();
        serialized = text.getBytes(UTF_8);
      } else {
        metrics.incrementMessagesDropped();
        return;
      }
    } catch (Exception e) {
      metrics.incrementMessagesDropped();
      return;
    }

    metrics.incrementBytes(serialized.length);
    if (serialized.length == 0) return; // lenient on empty messages
    collector.acceptSpans(serialized, NOOP);
  }
JMS contract is one session per thread: we need a new session up to our concurrency level.
zipkin-collector/activemq/src/main/java/zipkin2/collector/activemq/ActiveMQSpanConsumer.java