You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by de...@apache.org on 2009/07/20 19:27:36 UTC

svn commit: r795926 - in /activemq/stomp/trunk/webgen/src: default.css default.template index.page metainfo stomp10.page stomp10/ stomp10/additional.page stomp10/index.page stomp10/specification.page

Author: dejanb
Date: Mon Jul 20 17:27:35 2009
New Revision: 795926

URL: http://svn.apache.org/viewvc?rev=795926&view=rev
Log:
adding stomp 1.0 info and fixing menus

Added:
    activemq/stomp/trunk/webgen/src/metainfo
    activemq/stomp/trunk/webgen/src/stomp10/
    activemq/stomp/trunk/webgen/src/stomp10/additional.page
    activemq/stomp/trunk/webgen/src/stomp10/index.page
    activemq/stomp/trunk/webgen/src/stomp10/specification.page
Removed:
    activemq/stomp/trunk/webgen/src/stomp10.page
Modified:
    activemq/stomp/trunk/webgen/src/default.css
    activemq/stomp/trunk/webgen/src/default.template
    activemq/stomp/trunk/webgen/src/index.page

Modified: activemq/stomp/trunk/webgen/src/default.css
URL: http://svn.apache.org/viewvc/activemq/stomp/trunk/webgen/src/default.css?rev=795926&r1=795925&r2=795926&view=diff
==============================================================================
--- activemq/stomp/trunk/webgen/src/default.css (original)
+++ activemq/stomp/trunk/webgen/src/default.css Mon Jul 20 17:27:35 2009
@@ -1,92 +1,2 @@
-/* andreas07 - an open source xhtml/css website layout by Andreas Viklund - http://andreasviklund.com . Free to use for any purpose as long as the proper credits are given for the original design work.
 
-Version: 1.1, November 28, 2005 */
 
-/**************** Page and tag styles ****************/
-
-body
-{margin:0; padding:0; color:#303030; background:#fafafa url(images/bodybg.gif) top left repeat-y; font:76% Verdana,Tahoma,sans-serif;}
-
-ul
-{list-style:circle; margin:15px 0 20px 0; font-size:0.9em;}
-
-li
-{margin:0 0 8px 25px;}
-
-a
-{color:#d85d5d; font-weight:bold; text-decoration:none;}
-
-a:hover
-{color:#505050; text-decoration:underline;}
-
-img
-{float:left; margin:0 15px 15px 0; padding:1px; background:#ffffff; border:1px solid #d0d0d0;}
-
-a img
-{border-color:#d85d5d;}
-
-a img:hover
-{background:#d85d5d; border-color:#d85d5d;}
-
-/**************** Sidebar area styles ****************/
-
-#sidebar
-{position:absolute; top:0; left:0; width:220px; height:100%; overflow:auto; background:#e0e0e0 url(images/sidebarbg.gif) top right repeat-y; text-align:right;}
-
-body > #sidebar
-{position:fixed;}
-
-#sidebar h1
-{margin:20px 18px 0 5px; color:#d85d5d; font-size:1.6em; letter-spacing:-2px; text-align:right;}
-
-#sidebar h2, #sidebar h3
-{margin:0 20px 18px 5px; color:#808080; font-size:1.1em; font-weight:bold; letter-spacing:-1px; text-align:right;}
-
-#sidebar h3
-{margin:20px 18px 4px 5px; color:#606060;}
-
-#sidebar  p
-{margin:0 20px 18px 5px; color:#606060; font-size:0.8em;}
-
-#sidebar a
-{color:#808080}
-
-#sidebar ul
-{margin-right: 20px; margin-left: 5px; list-style-type: none;}
-
-#sidebar li
-{margin: 0px; padding-left: 5px;}
-
-/**************** Navigation menu styles ****************/
-
-#menu ul
-{list-style-type: none; margin: 0px; padding: 0px; font-size: 1.0em;}
-
-#menu li
-{margin: 0px; padding: 0px}
-
-#menu a,  #menu span
-{display:block; width:202px; padding:5px 18px 5px 0; color:#606060; background:#e0e0e0 url(images/sidebarbg.gif) top right repeat-y; font-size:1.8em; font-weight:normal; text-decoration:none; letter-spacing:-2px;}
-
-#menu a:hover, #menu span:hover
-{color:#303030; background:#f0f0f0 url(images/sidebarbg.gif) top right repeat-y;}
-
-#menu li.webgen-menu-item-selected a, #menu li.webgen-menu-item-selected span
-{padding:5px 18px 5px 0; background:#fafafa; border-top:2px solid #c0c0c0; border-bottom:2px solid #c0c0c0;}
-
-#menu li.webgen-menu-item-selected a:hover, #menu li.webgen-menu-item-selected span:hover
-{color:#505050; background:#fafafa;}
-
-/**************** Content area styles ****************/
-
-#content
-{width:520px; margin:0 0 0 240px; padding:20px 0; background:#fafafa;}
-
-#content p
-{margin:0 0 20px 0; line-height:1.5em;}
-
-#content h1
-{margin:0; color:#808080; font-weight:normal; font-size:2.5em; letter-spacing:-2px; text-align:center;}
-
-#content h2
-{clear:both; margin:30px 0 10px 0; color:#d85d5d; font-weight:normal; font-size: 2em; letter-spacing:-2px;}

Modified: activemq/stomp/trunk/webgen/src/default.template
URL: http://svn.apache.org/viewvc/activemq/stomp/trunk/webgen/src/default.template?rev=795926&r1=795925&r2=795926&view=diff
==============================================================================
--- activemq/stomp/trunk/webgen/src/default.template (original)
+++ activemq/stomp/trunk/webgen/src/default.template Mon Jul 20 17:27:35 2009
@@ -20,6 +20,7 @@
 <HEAD>
     <LINK href="http://activemq.apache.org/styles/site.css" rel="stylesheet" type="text/css">
     <LINK href="http://activemq.apache.org/styles/type-settings.css" rel="stylesheet" type="text/css">
+	<link rel="stylesheet" type="text/css" href="default.css" />
     <SCRIPT src="http://activemq.apache.org/styles/prototype.js" type="text/javascript"></SCRIPT>
     <SCRIPT src="http://activemq.apache.org/styles/rico.js" type="text/javascript"></SCRIPT>
     <SCRIPT src="http://activemq.apache.org/styles/site.js" type="text/javascript"></SCRIPT>
@@ -64,7 +65,7 @@
         <DIV class="top_red_bar">
 
           <DIV id="site-breadcrumbs">
-<A href="" title="Apache ActiveMQ NMS">STOMP</A>&nbsp;&gt;&nbsp;<A href="" title="Index">Home</A>
+			{breadcrumb_trail:}
           </DIV>
           <DIV id="site-quicklinks">
                                                                                                                                                                                                                                     <P><A href="http://activemq.apache.org/discussion-forums.html" rel="nofollow">Forums</A> &#124; <A href="http://activemq.apache.org/support.html" rel="nofollow">Support</A></P>
@@ -83,17 +84,22 @@
           <DIV class="navigation">
             <DIV class="navigation_top">
               <DIV class="navigation_bottom">
-                {menu: {max_levels: 1, used_nodes: files}}
-                <!--
-<H3>
-<A name="Navigation-Overview"></A><A href="overview.html" title="Overview">Overview</A></H3>
-<UL class="alternate" type="square">
-	<LI><A href="" title="Index">Home</A></LI>
-	<LI><A href="faq.html" title="FAQ">FAQ</A></LI>
-	<LI><A href="download.html" title="Download">Download</A></LI>
-</UL>
--->
-                                                                                                                                                                                                                                                                                                                                      </DIV>
+	      {menu: {max_levels: 2, min_levels: 2, used_nodes: files}}
+<!--				<H3>
+					<A name="Navigation-Overview"></A><A href="overview.html" title="Overview">Overview</A></H3>
+					<UL class="alternate" type="square">
+					<LI><A href="" title="Index">Home</A></LI>
+					<LI><A href="faq.html" title="FAQ">FAQ</A></LI>
+					<LI><A href="download.html" title="Download">Download</A></LI>
+					</UL>
+					
+				<H3>
+					<A name="Navigation-Overview"></A><A href="/stomp10/index.html" title="Overview">Stomp 1.0</A></H3>
+					<UL class="alternate" type="square">
+					<LI><A href="/stomp10/specification.html" title="Specification">Specification</A></LI>
+					<LI><A href="/stomp10/additional.html" title="Additional Information">Additional Information</A></LI>
+					</UL>
+ -->									                                                                                                                                                                                                                                                                                                                  </DIV>
             </DIV>
           </DIV>
         </TD>

Modified: activemq/stomp/trunk/webgen/src/index.page
URL: http://svn.apache.org/viewvc/activemq/stomp/trunk/webgen/src/index.page?rev=795926&r1=795925&r2=795926&view=diff
==============================================================================
--- activemq/stomp/trunk/webgen/src/index.page (original)
+++ activemq/stomp/trunk/webgen/src/index.page Mon Jul 20 17:27:35 2009
@@ -1,6 +1,5 @@
 ---
 title: Home
-in_menu: true
 routed_title: Stomp Protocol
 ---
 ## Stomp Protocol

Added: activemq/stomp/trunk/webgen/src/metainfo
URL: http://svn.apache.org/viewvc/activemq/stomp/trunk/webgen/src/metainfo?rev=795926&view=auto
==============================================================================
--- activemq/stomp/trunk/webgen/src/metainfo (added)
+++ activemq/stomp/trunk/webgen/src/metainfo Mon Jul 20 17:27:35 2009
@@ -0,0 +1,9 @@
+--- name:paths
+
+/stomp10/*.page:
+  in_menu: true
+
+--- name:alcn
+
+/stomp10/:
+  title: Stomp 1.0
\ No newline at end of file

Added: activemq/stomp/trunk/webgen/src/stomp10/additional.page
URL: http://svn.apache.org/viewvc/activemq/stomp/trunk/webgen/src/stomp10/additional.page?rev=795926&view=auto
==============================================================================
--- activemq/stomp/trunk/webgen/src/stomp10/additional.page (added)
+++ activemq/stomp/trunk/webgen/src/stomp10/additional.page Mon Jul 20 17:27:35 2009
@@ -0,0 +1,71 @@
+---
+title: Additional Information
+sort_info: 30
+--- name:overview
+
+# Stomp 1.0 - additional information
+Stomp 1.0 - additional information
+
+--- name:content 
+
+This page contains some additional information regarding Stomp protocol version 1.0 (not contained in the specification):
+
+{menu: {used_nodes: fragments}}
+
+#Transaction Handling
+
+Stomp uses named transactions so that many transactions can concurrently occur at the same time. 
+
+The client specifies the name and it is unique to that client.
+
+so: 
+
+	BEGIN
+	transaction: tx1
+	
+	^@
+
+then you can ack or send using the transaction
+
+	ACK
+	message: ID:19283:wheeeee:1234
+	transaction: tx1
+	
+	^@
+
+
+	SEND
+	destination: /queue/a
+	transaction: tx1
+	
+	hello queue a!
+	^@
+
+	ABORT
+	transaction: tx1
+	
+	^@
+
+Would "undo" the ack and send
+
+#Character Encoding
+
+We need to acknowledge character encoding and set some expectations. Much of this is taken from suggestions by SER (whom I don't otherwise know).
+
+First, make header names required to be legal [XML element names](http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-Name). This makes a lot of sense.
+
+Second, specify the default encoding is UTF-8. This makes ASCII a nice subset for telnet purposes. Add an encoding attribute to the CONNECT and CONNECTED frames. The server *should* use the same encoding the client requested on the CONNECT, defaulting to UTF-8 if nothing was specified, but if the client requested an encoding which the server cannot handle, it *must* send back the encoding it will use to handle the session (assuming it could understand the CONNECT frame, of course =)
+
+#Ack Modes
+The default message acknowledgement (when the server can consider the message to have been consumed by a client) is to treat it as acknowledged as soon as it is transmitted. An alternate is to require the client to acknowledge the message explicitely. Amongst other things this offers transactional message consumption and prevents flooding the client to the point of a crash and losing a pile of messages.
+
+To handle this the client may specify and ack header in a subscription request. The default is "auto" the alternate value (there may be more later) is "client". If "client" is used the client must send an ACK frame with the message-id from the message, which may also have a transaction header with an open transaction identifier.
+
+	SUBSCRIBE
+	ack: client
+	destination: /queue/a
+	
+	^@
+
+	ACK
+	message-id: ID:12345
\ No newline at end of file

Added: activemq/stomp/trunk/webgen/src/stomp10/index.page
URL: http://svn.apache.org/viewvc/activemq/stomp/trunk/webgen/src/stomp10/index.page?rev=795926&view=auto
==============================================================================
--- activemq/stomp/trunk/webgen/src/stomp10/index.page (added)
+++ activemq/stomp/trunk/webgen/src/stomp10/index.page Mon Jul 20 17:27:35 2009
@@ -0,0 +1,18 @@
+---
+title: Overview
+sort_info: 10
+--- name:overview
+
+# Stomp 1.0
+Stomp, Version 1.0
+
+--- name:content 
+
+This page contains information about Stomp version 1.0. Here you can find:
+
+* [Specification](specification.html)
+* [Additional Information](additional.html)
+
+
+
+

Added: activemq/stomp/trunk/webgen/src/stomp10/specification.page
URL: http://svn.apache.org/viewvc/activemq/stomp/trunk/webgen/src/stomp10/specification.page?rev=795926&view=auto
==============================================================================
--- activemq/stomp/trunk/webgen/src/stomp10/specification.page (added)
+++ activemq/stomp/trunk/webgen/src/stomp10/specification.page Mon Jul 20 17:27:35 2009
@@ -0,0 +1,212 @@
+---
+title: Specification
+sort_info: 20
+--- name:overview
+
+#Stomp Protocol Specification, Version 1.0
+Stomp Protocol Specification, Version 1.0
+
+--- name:content 
+
+#Stomp Protocol Specification, Version 1.0
+
+Initially the client must open a socket (I'm going to presume TCP, but really it is kind of irrelevant). The client then sends:
+
+	CONNECT
+	login: <username>
+	passcode:<passcode>
+			
+	^@
+
+The `^@` is a null (control-@ in ASCII) byte. The entire thing will be called a Frame in this doc. The frame starts with a command (in this case CONNECT), followed by a newline, followed by headers in a `<key>`:`<value>` with each header followed by a newline. A blank line indicates the end of the headers and beginning of the body (the body is empty in this case), and the null indicates the end of the frame.
+
+After the client sends the CONNECT frame, the server will always acknowledge the connection, by sending a frame which looks like:
+
+	CONNECTED
+	session: <session-id>
+	
+	^@
+
+The `session-id` header is a unique identifier for this session (though it isn't actually used yet).
+
+At this point there are a number of commands the client may send
+* SEND
+* SUBSCRIBE
+* UNSUBSCRIBE
+* BEGIN
+* COMMIT
+* ABORT
+* ACK
+* DISCONNECT
+
+##Client Commands
+
+
+###SEND
+
+The SEND command sends a message to a destination in the messaging system.  It has one required header, *destination*, which indicates where to send the message. The body of the SEND command is the message to be sent. For example:
+
+	SEND
+	destination:/queue/a
+	
+	hello queue a
+	^@
+
+This sends a message to the */queue/a* destination. This name, by the way, is arbitrary, and despite seeming to indicate that the destination is a "queue" it does not, in fact, specify any such thing. Destination names are simply strings which are mapped to some form of destination on the server - how the server translates these is left to the server implementation. See [this note on mapping destination strings to JMS Destinations](http://activemq.apache.org/stomp.html) for more detail.
+
+SEND supports a *transaction* header which allows for transaction sends.
+
+It is recommended that SEND frames include a content-length header which is a byte count for the length of the message body. If a content-length header is included, this number of bytes should be read, regardless of whether or not there are null characters in the body. The frame still needs to be terminated with a null byte and if a content-length is not specified, the first null byte encountered signals the end of the frame.
+
+###SUBSCRIBE
+
+The SUBSCRIBE command is used to register to listen to a given destination. Like the SEND command, the SUBSCRIBE command requires a *destination* header indicating which destination to subscribe to. Any messages received on the subscription will henceforth be delivered as MESSAGE frames from the server to the client. The *ack* header is optional, and defaults to *auto*.
+
+	SUBSCRIBE
+	destination: /queue/foo
+	ack: client
+	
+	^@
+
+In this case the *ack* header is set to *client* which means that messages will only be considered delivered after the client specifically acknowledges them with an ACK frame. The valid values for *ack* are *auto* (the default if the header is not included) and *client*.
+
+The body of the SUBSCRIBE command is ignored.
+
+Stomp brokers may support the *selector* header which allows you to specify an [SQL 92 selector](http://activemq.apache.org/selectors.html) on the message headers which acts as a filter for content based routing.
+
+You can also specify an *id* header which can then later on be used to UNSUBSCRIBE from the specific subscription as you may end up with overlapping subscriptions using selectors with the same destination. If an *id* header is supplied then Stomp brokers should append a *subscription* header to any MESSAGE commands which are sent to the client so that the client knows which subscription the message relates to. If using [Wildcards](http://activemq.apache.org/wildcards.html) and [selectors](http://activemq.apache.org/selectors.html) this can help clients figure out what subscription caused the message to be created.
+
+###UNSUBSCRIBE
+
+The UNSUBSCRIBE command is used to remove an existing subscription - to no longer receive messages from that destination. It requires either a *destination* header or an *id* header (if the previous SUBSCRIBE operation passed an id value). Example:
+
+	UNSUBSCRIBE
+	destination: /queue/a
+	
+	^@
+
+###BEGIN
+
+BEGIN is used to start a transaction. Transactions in this case apply to sending and acknowledging - any messages sent or acknowledged during a transaction will be handled atomically based on the transaction.
+
+	BEGIN
+	transaction: <transaction-identifier>
+	
+	^@
+
+The *transaction* header is required, and the transaction identifier will be used for SEND, COMMIT, ABORT, and ACK frames to bind them to the named transaction.
+
+###COMMIT
+
+COMMIT is used to commit a transaction in progress.
+
+	COMMIT
+	transaction: <transaction-identifier>
+	
+	^@
+
+The *transaction* header is required, you must specify which transaction to commit\!
+
+###ACK
+
+ACK is used to acknowledge consumption of a message from a subscription using client acknowledgment. When a client has issued a SUBSCRIBE frame with the *ack* header set to *client* any messages received from that destination will not be considered to have been consumed (by the server) until the message has been acknowledged via an ACK.
+
+ACK has one required header, *message-id*, which must contain a value matching the *message-id* for the MESSAGE being acknowledged. Additionally, a *transaction* header may be specified, indicating that the message acknowledgment should be part of the named transaction.
+
+	ACK
+	message-id: <message-identifier>
+	transaction: <transaction-identifier>
+	
+	^@
+
+The *transaction* header is optional.
+
+###ABORT
+
+ABORT is used to roll back a transaction in progress.
+
+	ABORT
+	transaction: <transaction-identifier>
+	
+	^@
+
+
+The *transaction* header is required, you must specify which transaction to abort\!
+
+###DISCONNECT
+
+DISCONNECT does a graceful disconnect from the server. It is quite polite to use this before closing the socket.
+
+	DISCONNECT
+	
+	^@
+
+
+##Standard Headers
+
+Some headers may be used, and have special meaning, with most packets
+
+###Receipt
+
+Any client frame other than CONNECT may specify a *receipt* header with an arbitrary value. This will cause the server to acknowledge receipt of the frame with a RECEIPT frame which contains the value of this header as the value of the *receipt-id* header in the RECEIPT packet.
+
+	SEND
+	destination:/queue/a
+	receipt:message-12345
+	
+	Hello a!^@
+
+
+##Server Frames
+
+The server will, on occasion, send frames to the client (in additional to the initial CONNECTED frame). These frames may be one of:
+* MESSAGE
+* RECEIPT
+* ERROR
+
+###MESSAGE
+
+MESSAGE frames are used to convey messages from subscriptions to the client. The MESSAGE frame will include a header, *destination*, indicating the destination the message was delivered to. It will also contain a *message-id* header with a unique identifier for that message. The frame body contains the contents of the message:
+
+	MESSAGE
+	destination:/queue/a
+	message-id: <message-identifier>
+	
+	hello queue a^@
+
+
+It is recommended that MESSAGE frames include a *content-length* header which is a byte count for the length of the message body. If a *content-length* header is included, this number of bytes should be read, regardless of whether or not there are null characters in the body. The frame still needs to be terminated with a null byte, and if a *content-length* is not specified the first null byte encountered signals the end of the frame.
+
+###RECEIPT
+
+Receipts are issued from the server when the client has requested a receipt for a given command. A RECEIPT frame will include the header *receipt-id*, where the value is the value of the *receipt* header in the frame which this is a receipt for.
+
+	RECEIPT
+	receipt-id:message-12345
+	
+	^@
+
+
+The receipt body will be empty.
+
+###ERROR
+
+The server may send ERROR frames if something goes wrong. The error frame should contain a *message* header with a short description of the error, and the body may contain more detailed information (or may be empty).
+
+	ERROR
+	message: malformed packet received
+	
+	The message:
+	-----
+	MESSAGE
+	destined:/queue/a
+
+	Hello queue a!
+	-----
+	Did not contain a destination header, which is required for message propagation.
+	^@
+
+
+It is recommended that ERROR frames include a *content-length* header which is a byte count for the length of the message body. If a *content-length* header is included, this number of bytes should be read, regardless of whether or not there are null characters in the body. The frame still needs to be terminated with a null byte, and if a *content-length* is not specified the first null byte encountered signals the end of the frame.
+
+This spec is licensed under the [Creative Commons Attribution v2.5](http://creativecommons.org/licenses/by/2.5/)
\ No newline at end of file