How to grans privilege to Oracle advance queue to be enqueued or dequeued

 -- we are given enqueue right to SchemaNameB to be able to enque SchemaName.QueueTableA
 sys.dbms_aqadm.Grant_queue_privilege ('ENQUEUE', 'SchemaName.QueueTableA', 'SchemaNameB', TRUE);
 -- we are given dequeue right to DBUserName to be able to dequeue message from queue
 sys.dbms_aqadm.Grant_queue_privilege ('DEQUEUE', 'SchemaName.QueueTableName' , 'DBUserName', FALSE);

For more information please visit