How to get the message Sender's information in MSMQ?

Hi, everyone
I am going to develop a Windows server to monitor the messages in MSMQ. Now I wanna get the message sender's name(that is the API of this message, like class name or function name of who send the message.) I make a simple demo and it can easy to get
the message body. But is it possible to get the sender's info by using any MSMQ method ? Looking forward any answers. Thanks so much.
Shuo Lei

Hi,
Sender object is type of object any time if you want to use any property/attribute of sender object first you need to type cast it with your desire object.
For more information, you could refer to:
http://blog.jsinh.in/managing-msmq/#.VPe5mnkfqM8
http://forums.asp.net/t/343932.aspx?How+can+I+get+values+of+sender+object+in+C+
Regards

Similar Messages

  • How to get the message from a Runnable class

    The Schedule class is actually a JFrame, what I want to do is to "get" the message from Scheduler Class and display it in a JTextField, to let user know what is doing.
    How can I approach this?
    public class Schedule {
        @SuppressWarnings("static-access")
        public static void main(String args[]) throws InterruptedException {
            final Scheduler s = new Scheduler();
            Thread t = new Thread(s);
            t.start();
    public class Scheduler implements Runnable{
    private static int actionType;
    private static String msg;
        public static void setMsg(String msg) {
            Scheduler.msg = msg;
        public static String getMsg() {
            return msg;
        public void run() {
            //System.out.println((int)(Math.random() * 1000));
            actionType = 1;
            while(true){
                try {
                    switch(actionType){
                        case 1:
                            setMsg("Process actionType: "+actionType);
                            break;
                            case 2:
                            Thread.sleep(2000L);
                            setMsg("Process actionType: "+actionType);
                            break;
                            case 3:
                            Thread.sleep(2000L);
                            setMsg("Process actionType: "+actionType);
                            break;
                            case 4:
                            Thread.sleep(2000L);
                            setMsg("Process actionType: "+actionType);
                            break;
                    actionType++;
                    if(actionType>4){
                        actionType = 1;
                } catch (InterruptedException ex) {
                    System.out.println("Scheduler.run:"+ex.toString());
    }

    Or with only one loop:
            int actionType = 0;
            while (true)
                actionType = (actionType % 4) + 1;
                msg = "Process actionType: " + actionType;
                try
                    Thread.sleep(2000L);
                catch (InterruptedException ex)
                    System.out.println("Scheduler.run:" + ex.toString());
            }

  • How to get the addition DML Error information when using PL/SQL?

    Given the following statements:
    drop table bob;
    create table bob
    col1 number(6,2),
    col2 number(6,2) not null
    insert into bob(col1, col2) values (123.12, null);
    insert into bob(col1, col2) values (123.12, 12345.12);
    commit;
    I get different behavior from Oracle error messages.
    Here is the sample output:
    Table dropped.
    Table created.
    insert into bob(col1, col2) values (123.12, null)
    ERROR at line 1:
    ORA-01400: cannot insert NULL into ("BOB"."COL2")
    insert into bob(col1, col2) values (123.12, 12345.12)
    ERROR at line 1:
    ORA-01438: value larger than specified precision allows for this column
    Commit complete.
    Note that in the first error (1400) the generated error message contains the name of the problematic column ("BOB"."COL2"). Also note that in the regurgitated statement the error pointer (*) is at the far left. In this case, the regurgitated statement is of no use to me because the error message identifies the culprit column.
    However, in the second error (1438) the generated error message is very generic and does NOT indicate the problematic column. In addition, in this case the error pointer (*) of the regurgitated statement has moved to point to the troublesome column. In this case, I must use BOTH the error message and the regurgitated statement to completely understand the problem.
    This difference in how error messages are constructed causes difficulty within PL/SQL. If PL/SQL happens to generate a 1400 error message, then simply capturing the error message and giving it to the user provides enough information for him/her to solve the problem. However, if a 1438 error is generated then the resulting error message has insufficient information for the user to pursue the problem.
    So my question is, within PL/SQL do you know how to get your hands on Oracle's regurgitated statements so that they can be presented to the user to assisted him/her in problem resolution?
    Thanks.

    I don't think it's that easy. Notice that if you put the insert into an actual pl/sql block, you don't get the correct column pointer anymore.
    BEGIN insert into bob(col1, col2) values (123.12, 12345.12); END;
    ERROR at line 1:
    ORA-01438: value larger than specified precision allows for this column
    ORA-06512: at line 1
    Richard

  • How to get the computer to enter information

    I am trying to create a website that will match lonely people that have no place to go for the holidays with people that are willing to "host" these people. In order to do that I need people to be able to enter information in and have the computer match the information with another person's information. First: how do I make a space on iweb where people can enter the information, and second how can I get the computer to sort through and show the results of the information?

    holidayjoy wrote:
    First: how do I make a space on iweb where people can enter the information, and second how can I get the computer to sort through and show the results of the information?
    Welcome to the discussions. It may be hard to do this in iWeb without experience of programming. So here are some web-based "community sharing" sites which you could easily sign up with and optionally link to from your iWeb site:
    http://www.backpackit.com/tour
    http://www.ning.com
    http://www.lefora.com
    And you could embed a _Frappr! Social Map_ into your iWeb site via the +HTML Snippet+ window. ...It gives Web site owners and visitors an easy and unique way to visualize and interact with each other. Visitors can add their name, photo and message directly on a Web page embedded with +Frappr! Maps+, and the Web site owner gets real-time stats on where visitors are coming from and how often they visit.
    And here is a list of 125 "services" allowing multiple users to group and collaborate/share including blogging, bookmarking, tasks, to-do etc.

  • How to Get  the SSO Logged user information in database trigger

    I need to track which SSO user is inserting data into a table , so how can i get the information of that user in a database trigger on that table
    thanks

    Try using portal30.wwctx_api.get_user returns a varchar2 (PUBLIC) or the Username that is logged in
    I need to track which SSO user is inserting data into a table , so how can i get the information of that user in a database trigger on that table
    thanks

  • How to get the message ID generated by the PI system during message mapping

    Hi All,
    I have a file to file scenario, where during the mapping, I want to map and send the Message ID generated by PI.
    Can anyone please help me with this?
    Kind regards,
    Joe

    Hi,
    You have write UDF for this.
    Please see the below code .
    java.util.Map map = container.getTransformationParameters();
    String MesID = (String)map.get(StreamTransformationConstants.MESSAGE_ID);
    return MesID;
    Hope this helps to you.
    Regards,
    P.Rajesh

  • I have yahoo email and it downloads, but there is nothing there when I open it.  Does anyone know how to get the message?

    I have yahoo email and it downloads, but there is nothing there when I open the message. Does anyone have any suggestions?

    First of all, thank you for your patience, this is driving me nuts, can't imagine what you must think right now....
    I made a screenshot that hopefully clears this up:
    On the left is what I see when I open up Finder preferences, and then the Sidebar tab. As you can see all boxes are checked. The Middle folder that is open is what I see when I open Finder from the taskbar. which is fine by me. On the right however I have opened Macintosh HD. And as you can see, there is no sidebar, it just opens up with 4 folders.
    Weirdly enough, when I tried to add a photo to my apple ID just now, the sidebar came up just fine. And I have found that it does that with more programs. So it is literally only when I open up Macintosh HD that it wont do it. I hope this clarifies it a bit more.
    and to answer this question:
    I'm not quite sure I understand. Is the sidebar layout you showed me not the one you want? Because if it is the one you want then you should just close the preferences window behind it.
    this sidebar only pops up when I open the preferences - general - show in new finder  part and then choose 'other'. I cant close the preference window behind it, because then it will close that pop-out folder as well..

  • How to get the user and groups information from http header

    Hi All,
    In my current scneario, we are using Siteminder for SSO setup.. And in this process, after authentication and authorization, they are going to append the user information and group information of the user into a HTTP header and it will be sent back to our presentation services.. We have to extract the user information and group information from the http header.
    My HTTP header will look like as follows..
    SM_USER XYZ
    SM_USERDN CN=Firstname\, Lastname\, xyz, OU=GPO-Low Level Security,OU=Domain Users,OU=BU FDT,
    SM_USERGROUPS CN=GG-CA-SiteminderAdmins, OU=Global,OU=Domain Groups, DC=com^CN=GG-ServiceDeskAdmin-TCCORPCEFS
    And also if anyone explain me the overall working of SSO in detail like how presentation services will make a connection to BI server( I guess using Impersonator User), and also how our BI server will read the URL from presentation services and the over all working flow in our OBIEE..
    Thanks a lot....

    Please use the search! this topic has come up lots of times already.

  • How to get the edit channel link from within the channel?

    Following problem:
    I want to include a link to edit the settings of a channel in the channel contents. The link should be the same as the edit button on the frame of the channel container. Searching through the provider jsps I found that the edit link is created in single.jsp. The code I need seems to boil down to
    <dt:obtainContainer container="$JSPProvider">
      <dtsingle:singleContainerProvider>
      <dtpc:getStringProperty key="editContainerName" id="editContainerName" scope="request"/>
      <dt:getName id="SingleContainer" scope="request"/>
      <jx:declare id="editContainerName" type="java.lang.String"/>
      <jx:declare id="SingleContainer" type="java.lang.String"/>
        <dtsingle:obtainSelectedChannel>
    <A HREF="<dtpc:getDesktopURL/>?action=edit
    &provider=<%=editContainerName%>
    &targetprovider=<dt:getName/>
    &containerName=<%=SingleContainer%>"
    TARGET="_self"> EDIT! </A>
        </dtsingle:obtainSelectedChannel>
      </dtsingle:singleContainerProvider>
    </dt:obtainContainer>However I am unable to get that working in the channel, as I always receive a ProviderException on the line with
    <dt:obtainContainer container="$JSPProvider">
    What am I doing wrong, or is does the obtainContainer simply not work from within a channel?
    If anyone can help me out to get the edit link it would be greatly appreciated. Any hints and/or sample code would help alot.
    thanks!
    Message was edited by:
    obstler42

    Hi Detlev ,
    Thank you very very much . We could figure out how to get the URL and Driver information from there .I have rewarded the points also.
    Thanks
    Ravi
    Message was edited by: Ravi Krishnan

  • How to get the value of Selected Dimension in a Pie Chart ?

    Hi All,
    Here is an example i'm working on ,
    JS Bin - Collaborative JavaScript Debugging&lt;/title&gt; &lt;link rel=&quot;icon&quot; href=&quot;http://static.jsbin.…
    I'm using selectData event to fire when any data is selected in the chart. How to get the value of dimension, in my case country which has been selected ?
    Thanks & Regards
    Sakthivel

    Hi,
    I added below code
    var oSelectData = oEvent.getParameter("data");
    // let the dataset convert the event coordinates back to a UI5 model context
    var oContext = this.getDataset().findContext(oSelectData[0].data[0].ctx.path);
                   console.log(oContext);
    in console  I am able to get the path of selected dimention.
    JS Bin - Collaborative JavaScript Debugging&lt;/title&gt; &lt;link rel=&quot;icon&quot; href=&quot;http://static.jsbin.…
    you can figure out how to get the data from this information.
    Regards,
    Chandra

  • Why do I keep getting the message; Network error occurred?

    Whenever I try to send an email. The message in the outbox states the sending failed. When I click on that email, it simply states that, Network error, occurred.
    What is causing this network error?

    Hello,
    Thank for the reply. My zip code is: 19702.
    My browser is the latest Android. Completely stock. I can access the internet. I don't use chrome. 
    I get the message only when I try to send emails from my Verizon email account. I can sometimes receive email but not all the time. I cannot send emails at all once this happens. I can send and receive emails from other email accounts except Verizon (that is why I am using Hotmail).
    If I completely deleted my Verizon account, restart my phone, than add my account back on to the phone, it will work for a couple of emails than I will get the message; send fail. Network error occurred. 
    Sent from my Verizon Wireless 4G LTE smartphone

  • When I attach a JPG file in my email and send it to a Windows friend they get the message "The file type being saved or retrieved has been blocked when they try to open it." Anyone know why and how to fix this problem?

    When I attach a JPG file in my email message and send it to a Windows friend they get the message "The file type being saved or retrieved has been blocked when they try to open it so that they can save it." Anyone know why and how to fix this problem?

    Your Windows friend should ask in a Windows forum why his email client won't open attached jpg files. We have no idea what email client he is using or how his Windows security is configured.

  • I have changed my PC, deactivated Adobe Acrobat and tried to load on new PC. Got to registration and get the message " A problem was encountered while trying to send information over internet" this is 8 standard

    I have changed my PC, deactivated Adobe Acrobat and tried to load on new PC. Got to registration and get the message " A problem was encountered while trying to send information over internet" this is 8 standard
    When I try to use it to make pdf files I get the message "Missing PDFMaker files
    It is a proper copy with serial numbers

    Moving this discussion to the Acrobat Installation & Update Issues forum.

  • HT2480 I keep getting the message "unable to verify account information" how do I fix this? It happened out of no where and I tried re-entering the exchange info and it won't stop giving me the message...any ideas?!?

    I keep getting the message "unable to verify account information" how do I fix this? It happened out of no where and I tried re-entering the exchange info and it won't stop giving me the message...any ideas?!?
    I already reset network settings like someone suggested, but still cannot get my exchange acct to work.

    I'm having the same problem but with high speed access.
    Anyone know the answer?
    ~Chris

  • HT4628 I am able to download updates and send and receive email so I know I have connection to my wireless router. However, when I click on Safari, I get the message "Safari quit unexpectedly." What is my problem and how do I solve?

    When I click on Safari, I get the message "Safari quit unexpectedly." I know I have access to my wireless net work because I just found and downloaded updates and can send and receive mail. What is my problem and hoe is it solved?

    As Outlook is not an Apple product, you will find more helpers familiar with Outlook here:
    Office for Mac forums

Maybe you are looking for