Create Stored Procedure to Enqueu Oracle Advance Queue

CREATE OR replace PROCEDURE schemaName.EnqueMassage(
  message      IN VARCHAR,
  source       IN VARCHAR DEFAULT NULL,
  msgtransstat SMALLINT DEFAULT 0,
  msgappln     VARCHAR DEFAULT NULL,
  msgpriority  SMALLINT DEFAULT 3)
AS
  msg              sys.aq$_jms_text_message;
  queue_options    dbms_aq.enqueue_options_t;
  msg_props        dbms_aq.message_properties_t;
  msg_id           RAW(16);
  queuename        VARCHAR2(200);
  tmp_msg_priority SMALLINT := 1;
  tmp_prio_order   NUMBER := 0;
BEGIN
    msg := sys.aq$_jms_text_message.Construct();
    queuename := '{QUEUENAME}';
    tmp_msg_priority := msgpriority;
    msg.Set_text(message);
    tmp_msg_priority := Nvl(tmp_msg_priority, 1);
    msg_props.correlation := source;
    msg_props.priority := tmp_msg_priority;
    
    dbms_aq.Enqueue(
      queue_name => queuename,
      enqueue_options => queue_options,
      message_properties => msg_props,
      payload => msg,
      msgid => msg_id
    );

EXCEPTION
  WHEN OTHERS THEN
  NULL;
END;

For more info please visit: https://docs.oracle.com/database/121/ARPLS/d_aq.htm#ARPLS097