code: public void setMessageListener(MessageConsumer consumer, MessageListener listener) throws JMSException {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setMessageListener", new Object[]{consumer, listener});
  
      if (!(consumer instanceof JmsMsgConsumerImpl)) {
        // This "shouldn't happen" (tm) because the calling code switches on the class of the consumer.
        throw (JMSException) JmsErrorUtils.newThrowable(
            JMSException.class,
            "WRONG_CONSUMER_TYPE_CWSIA0088",
            new Object[] { consumer.getClass().getName() },
            null,
            "MessageListenerSetter.setMessageListener#1",
            this,
            tc);
      }
  
      JmsMsgConsumerImpl c = (JmsMsgConsumerImpl) consumer;
  
      boolean checkManaged = false;
      c._setMessageListener(listener, checkManaged);
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setMessageListener");
    }
docs: Assign a messageListener to the message consumer.
  @see com.ibm.wsspi.jms.JmsMessageListenerSupport.MessageListenerSetter#setMessageListener(javax.jms.MessageConsumer, javax.jms.MessageListener)