Poster for the Notification of the Subscriber (dbms_aq.post) does not work as expected

Hello

I have the case study for the notification to the Subscriber specific QA that I had planned to use to send messages to the other sessions without subscriber . I just wanted to know feature QA POSITION.

Well I tried and google hours and reading documentation, but I can't figure out what I did wrong. There is not much information about this post method.

Expected result is a message in the my_queue_debug table, but there is nothing!

Any ideas where it's going?

Oracle 12 c EA

--NAME            TYPE    VALUE 
--------------- ------- -----
--aq_tm_processes integer 1  
--job_queue_processes integer 1000  

--create user aq identified by aq
--;
--grant dba to aq
--;
--grant execute on dbms_aq to aq
--;
create table my_queue_debug(msg varchar2(100))
;
create type my_payload as object (msg varchar2(100));
/
set serveroutput on
begin
  dbms_aqadm.create_queue_table('my_queue_table', 'my_payload', multiple_consumers=>true);
  dbms_aqadm.create_queue('my_queue', 'my_queue_table');
  dbms_aqadm.start_queue ('my_queue');
  dbms_aq.register (
    sys.aq$_reg_info_list(
      sys.aq$_reg_info('my_queue:aq',
        dbms_aq.namespace_anonymous,
        'plsql://my_queue_callback',
        hextoraw('FF')
      )
    ), 1
  );
end;
/
create or replace
procedure my_queue_callback(
  context  raw,
  reginfo  sys.aq$_reg_info,
  descr    sys.aq$_descriptor,
  payload  raw,
  payloadl number
) as
  l_options    dbms_aq.dequeue_options_t;
  l_properties dbms_aq.message_properties_t;
  l_handle     raw(16);
  l_payload    my_payload;
begin
  l_options.msgid := descr.msg_id;
  l_options.consumer_name := descr.consumer_name;
  --
  dbms_aq.dequeue(
    queue_name         => descr.queue_name,
    dequeue_options    => l_options,
    message_properties => l_properties,
    payload            => l_payload,
    msgid              => l_handle
  );
  --
  insert into my_queue_debug (
    msg
  ) values (
    l_payload.msg
  );
  commit;
end;
/
begin
  dbms_aq.post(
    sys.aq$_post_info_list(
      sys.aq$_post_info(
        'my_queue:aq',
        dbms_aq.namespace_anonymous,
        utl_raw.cast_to_raw( 'my message' )
      )
    ), 1
  );
end;
/
select user_data from aq$my_queue_table
;
select * from my_queue_debug
;
drop table my_queue_debug purge
;
begin
  dbms_aqadm.stop_queue('my_queue');
  dbms_aqadm.drop_queue('my_queue');
  dbms_aqadm.drop_queue_table('my_queue_table');
end;
/
drop type my_payload
;


Table MY_QUEUE_DEBUG created.
Type MY_PAYLOAD compiled
PL/SQL procedure successfully completed.
Procedure MY_QUEUE_CALLBACK compiled
PL/SQL procedure successfully completed.

no rows selected

no rows selected

Table MY_QUEUE_DEBUG dropped.
PL/SQL procedure successfully completed.
Type MY_PAYLOAD dropped.



Hello

change your reminder of PL/SQL procedure, that it will only insert a line:

create or replace procedure my_queue_callback(
  context  raw,
  reginfo  sys.aq$_reg_info,
  descr    sys.aq$_descriptor,
  payload  raw,
  payloadl number ) as  

  l_options    dbms_aq.dequeue_options_t;
  l_properties dbms_aq.message_properties_t;
  l_handle     raw(16);
  l_payload    my_payload;  

begin  

  insert into my_queue_debug ( msg ) values ( 'this is a test payload');

  commit;  

end;
/

Change the entry in the register of the recall without a consumer:

begin

  dbms_aq.register (
    sys.aq$_reg_info_list(
      sys.aq$_reg_info('my_queue',
        dbms_aq.namespace_anonymous,
        'plsql://my_queue_callback',
        hextoraw('FF')
      )
    ), 1
  );  

end;
/

The unit test works now:

SQL>
SQL> select * from my_queue_debug;

no rows selected

SQL>
SQL> begin
  2
  3    dbms_aq.post(
  4      sys.aq$_post_info_list(
  5        sys.aq$_post_info(
  6          'my_queue',
  7          dbms_aq.namespace_anonymous,
  8          utl_raw.cast_to_raw( 'my message' ) ) ), 1 );
  9
 10  end;
 11  /

PL/SQL procedure successfully completed.

SQL>
SQL>
SQL> exec  dbms_lock.sleep(10);

PL/SQL procedure successfully completed.

SQL>
SQL> select * from my_queue_debug;

MSG
-----------------------------------------------------------
this is a test payload

It is important to do not query the table immediately after the message. The callback mechanism needs a bit of time.

Kind regards

WoG

Tags: Database

Similar Questions

  • calendar for the week of jQuery does not work in the new version of firefox v42.0

    Hello
    Thanks for your reply.
    IAM develop on the issue that iam facing knowledge, events on the calendar for the week of jquery does not work in firefox version iam 42.0 faced to the problem that iam unable to change back or delete nominations that are displayed.
    For example if try clicking on one of the appointment generally a popup comes to change or to restore or remove the appointment but iam not getting that. But this feature does not work in lower versions of firefox (version 32.0 for example). Please check the jquery week calendar demo following URL looks like this:
    http://robmonie.github.IO/jQuery-week-calendar/full_demo/weekcalendar_full_demo.html

    I've just rescheduled lunch 12:00-12:15, so it seems to work on 42 Firefox on Windows.

    What is the latest version, where it has worked for you?

    Have you tested Mode Firefox safe to rule out the possibility of an extension conflict? See: Firefox in Safe Mode troubleshooting questions.

  • Bought two of the iTouch, one for my wife and one for me. In the Notes his has the "" symbol for the formatting and mine does not work. Any suggestions?

    I bought the iTouch two at a time, one for my wife and one for me. In the application 'Notes' my wife shows the symbol "+" to the formatting and mine does not work. Any suggestion.

    Could you please include screenshots of the so-called issue?

  • Buttons for the S60 menu light does not work

    Hi all

    On Lenovo S60 menu button illumination does not work. Is this normal and supposed to be like this, or it's some sort of bug?

    Thank you!

    S60 is not backlit on the recent button, home and back.

    Thank you.

  • I just bought Photoshop CC and the shortcut of the space for the hand tool bar does not work?

    I googled solutions to the problem and most of them said that I need to close other programs that I opened, as well as photoshop and then restart the program, so I tried this and nothing seems to work. Tool hand by itself works, but I prefer by far with the SPACEBAR shortcut as I need to work fast and it's much easier.

    Is it possible that I need to activate the SPACEBAR shortcut, because I bought the software this morning?

    Thank you

    Hi Jessthristan,

    Hold the space bar to drag documents works very well for me. You can try closing out of all your other applications one by one and see if one of them interferes with Photoshop? Chrome is known for sometimes pleasant not with that.

  • Line for the Hover draw style does not work in Internet Explorer

    I found a great way to create a substitution effect when you hover over a table row, giving the row a class of "resultsRow" and using the following rules in my stylesheet:

    {.resultsRow}
    background-color: #EAEEB1;
    }
    {.resultsRow:hover}
    background-color: #D2DE56;
    }

    It works perfectly in Firefox, but doesn't work at all in Internet Explorer, that's what will use the majority of our audience. Does anyone know a fix for this in Internet Explorer?

    The game, July 20, 2006 08:21:43 + 0000 (UTC), "Claire S.
    wrote:

    > .resultsRow {}
    > background-color: #EAEEB1;
    > }
    > .resultsRow:hover {}
    > background-color: #D2DE56;
    > }
    >
    > This works perfectly in Firefox, but doesn't work at all in Internet Explorer.
    > which is what will use the majority of our audience. Does anyone know a fix
    > in Internet Explorer?

    As you have seen, IE is old and does not support. You can do it
    quite easily with JavaScript:


    onMouseOut = "this.className = 'resultsRow'" > ""

    Gary

  • Smartphones blackBerry BIS in Germany for the Base Manager. ePlus does not work

    Hello

    I'm a little desperate because RIM seems to be is not accessible to the ordinary guy. Maybe someone here can help.

    Someone knows when in Germany the BIS for telephony mobile provider Base respectively eplus working again?

    I only see a '3g' (with small g) and no logo BB indicating that BIS is not available. Base told me to ask the RIM; they don't have any information when BIS becomes operational.

    Thank you very much

    Axel

    They give you the wrong info. BIS is a RIM service, there is no doubt about that. But customers must contact the carrier for all kinds of support. If the carrier is unable to resolve the problem, then they it will intensify to the RIM using established channels.

  • Solution of blackBerry Smartphones for the contact numbers display does not work

    I want to see alongside my contacts phone numbers, but when I try the recommended solution (open the tray-> options-> language-> global name display), it gives me two options: 1) first, last and 2) Last, first.

    Neither of these options will display the numbers as well as names. I tried to turn on and off as well.

    I use a new torch bought new, SIM-free and sealed on Ebay in the United Kingdom. It is clear from the stop icon it is an O2 mobile. My network is CytaMobile Vodadone. Grateful for any help.

    Second question: when I type SMS messages it has only a tiny line to enter a big gap of empty space between the beneficiary and as I type. I'm used to having a bigger screen to type on even on a basic phone. no idea how to change this? Thank you!

    Apart from that, I think that my blood pressure has dropped, now that I don't have to continue running to a PC to check what email I might have missed.

    Hello and welcome to the forums!

    I don't think he has no option in the stock OS to display the numbers next to the names of the contacts.  You might be able to do this with an application of part 3, but there is no way to do this with the unit as is.

    It is also impossible to change the entry in the SMS app, I'm afraid.  The line will extend automatically as you type a message, but it starts with just the line.

    Sorry to be the bearer of bad news.

  • Œuvres ping for the VPN ASA5505 RDP does not work?

    I have an ASA5505 VPN remote access facility

    I have a server connected directly behind the ASA and I can ping the server without problem.

    The reports being encrypted and decrypted packets VPN client

    However when I try to RDP to the server packages encyrpted keep incrementing but the decrypted packets are not.

    I also do not see all RDP traffic hit the server (checked by ethereal)

    I did a packet trace and it succeeds, but ends with a parody of IP which I believe is correct as is the vpn traffic and not actually be encrypted.

    This is the correction of the RDP session, I'm confused by one ICMP denied on line 2 that I am able to ping the server?

    % ASA-6-302013: built of TCP connections incoming 88193 for external:172.16.24.4/50984 (172.16.24.4/50984) at internal:192.168.100.146/3389 (192.168.100.146/3389) (roger_ssl)

    % ASA-4-313004: Denied ICMP type = 0, of laddr 172.16.24.4 on the external interface to 192.168.100.146: no matching session

    % ASA-609001 7: built internal local-host: 192.168.100.37

    % ASA-6-302015: built connection UDP incoming 88194 for external:172.16.24.4/50620 (172.16.24.4/50620) at internal:192.168.100.37/53 (192.168.100.37/53) (roger_ssl)

    % ASA-4-313004: Denied ICMP type = 0, of laddr 172.16.24.4 on the external interface to 192.168.100.37: no matching session

    % ASA-6-302015: built connection UDP incoming 88195 for external:172.16.24.4/64598 (172.16.24.4/64598) at internal:192.168.100.37/53 (192.168.100.37/53) (roger_ssl)

    % ASA-4-313004: Denied ICMP type = 0, of laddr 172.16.24.4 on the external interface to 192.168.100.37: no matching session

    % ASA-4-313004: Denied ICMP type = 0, of laddr 172.16.24.4 on the external interface to 192.168.100.37: no matching session

    % 302014-6-ASA: disassembly of the TCP connection 88193 for external:172.16.24.4/50984 to internal:192.168.100.146/3389 duration 0: bytes of 00:00 0 flow closed by inspection (roger_ssl)

    I have that configured NAT

    NAT (internal, external) static source 192.168.100.0 192.168.100.0 static destination VPN_172 VPN_172

    The only logical bit that is closed by the inspection flow? Is this to say that the server has not responded?

    And decrypt packets increase not when trying to RDP

    Does this mean anyting to anyone that I have arrived at the end of my knowledge of the SAA on this one!

    Thank you

    Roger

    Answer is based on your other thread:

    https://supportforums.Cisco.com/thread/2207372

  • When I install adobe flash player, I get a bar that goes into the top of the page: install missing plugins. When I press on it for the missing plugin, it does not work and instead it shows manually to install the plugin. But this does not really work.

    Adobe flash player will not update.

    This has happened

    Each time Firefox opened

    == I want to update and install adobe flash player

    Hello irvkaplan.

    I hope that this support article is what you need:

    http://support.Mozilla.com/en-us/KB/installing+the+Flash+plugin

    If you need additional assistance, please contact Adobe.

  • Logic of filters for the IPA in bulk does not work

    Hi all

    I tried to use the filter to get contacts and accounts by the API data in bulk.

    When you use an expression of simple comparison, this works well. But when you attempt to join 2 comparisons with AND only the first works, but the second seems to be ignored.

    I'm sure that my expressions are correct, because when I change any part to be bad words, I would get the "bad request (400)" exception.

    Any suggestions?

    Thank you

    Biao

    It works now. (I don't know why).

    Thank you.

  • Terms of the license agreement for the Flash Player - link does not work.

    https://ACOM-author.Corp.Adobe.com/content/dam/ACOM/en/legal/licenses-terms/PDF/Flash_Play er_21_0.pdf

    We do not install the update without reading the agreement.

    We need help, thank you.

    Hello

    The link is incorrect. The correct link is https://www.adobe.com/content/dam/acom/en/legal/licenses-terms/pdf/Flash_Player_21_0.pdf

    Where did you get this link, so that I can raise the problem and the corrected?

    --

    Maria

  • I keep seeing pop up ads powered by '' cn tatami '' whenever I have to navigate using Safari or open a link on the FB Adblocker app does not work for this. Any suggestions? There is no option to cross the pop-up ad that it redirects to various Web sites.

    I keep seeing pop up ads powered by '' cn tatami '' whenever I have to navigate using Safari or open a link on the FB Adblocker app does not work for this. Any suggestions? There is no option to cross the pop-up ad that it redirects to various Web sites.

    Cache and history of the site Clear settings - Safari -.

    (1232)

  • The slide show feature does not work when I used my Apple TV new 4th gen. I have all the minimum requirements for Macbook and Macbook OSX the Airport express. The slide show starts and stops after that 7 photos are displayed on the TV. If I change the

    The slide show feature does not work when I used my Macbook with new Apple TV 4th gen. The slide show stops after that display 7 photos and display to select the options for the slide show is displayed on the screen. The selected interval was 5 seconds. If the interval is spent in 3 seconds the slide show would work for a time and then to display random images. Has worked with Apple on this issue Support Mike and he managed to reproduce the problem. Since I'm in the return period of 14 days for this product, I returned it to the Apple store

    Welcome to the Apple community.

    After returning, I'm not really clear on what your question.

  • my button is not the top of my list of contacts - when I start typing a name, a list does not appear, for me to choose and my spell checker does not work

    my button is not the top of my list of contacts - when I start typing a name, a list does not appear, for me to choose and my spell checker does not work

    Hi Lynn,

    What mail client do you use?

    Using Windows Live Mail or Outlook?

    For Windows Live Mail:

    The best place to ask your question of Windows Live is inside Windows Live help forums. The experts he specialize in all things, Windows Live and I would be happy to help you with your questions! Please choose a product below to be redirected to the appropriate community:

    Windows Live Mail

    Windows Live Hotmail

    Looking for a different product to Windows Live? Visit the home page Windows Live Help for the complete list of Windows Live forums at www.windowslivehelp.com.

    For Outlook:

    http://answers.Microsoft.com/en-us/Office/Forum/Outlook

    If you are not using one of the people then please let us know what you use so that we can help you further.

Maybe you are looking for