Skip to content
This repository was archived by the owner on Nov 28, 2018. It is now read-only.

Reconnect #31

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea/
node_modules/
2 changes: 2 additions & 0 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/**
docs/**
96 changes: 96 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
// JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details

"maxerr" : 50, // {int} Maximum error before stopping

// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // true: Identifiers must be in camelCase
"curly" : true, // true: Require {} for every new block or scope
"eqeqeq" : true, // true: Require triple equals (===) for comparison
"forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty()
"immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
"indent" : 4, // {int} Number of spaces to use for indentation
"latedef" : true, // true: Require variables/functions to be defined before being used; (DEFAULT:false)
"newcap" : false, // true: Require capitalization of all constructor functions e.g. `new F()`
"noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
"noempty" : false, // true: Prohibit use of empty blocks; (DEFAULT:true)
"nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment)
"plusplus" : false, // true: Prohibit use of `++` & `--`
"quotmark" : false, // Quotation mark consistency:
// false : do nothing (default)
// true : ensure whatever is used is consistent
// "single" : require single quotes
// "double" : require double quotes
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
"unused" : false, // true: Require all defined variables be used (DEFAULT:true)
"strict" : true, // true: Requires all functions run in ES5 Strict Mode
"trailing" : false, // true: Prohibit trailing whitespaces
"maxparams" : false, // {int} Max number of formal params allowed per function
"maxdepth" : false, // {int} Max depth of nested blocks (within functions)
"maxstatements" : false, // {int} Max number statements per function
"maxcomplexity" : false, // {int} Max cyclomatic complexity per function
"maxlen" : false, // {int} Max number of characters per line

// Relaxing
"asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
"boss" : false, // true: Tolerate assignments where comparisons would be expected
"debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
"eqnull" : false, // true: Tolerate use of `== null`
"es5" : false, // true: Allow ES5 syntax (ex: getters and setters)
"esnext" : false, // true: Allow ES.next (ES6) syntax (ex: `const`)
"evil" : false, // true: Tolerate use of `eval` and `new Function()`
"expr" : true, // true: Tolerate `ExpressionStatement` as Programs (had to switch to true for sinon chai statments...calledOnce)
"funcscope" : false, // true: Tolerate defining variables inside control statements"
"globalstrict" : false, // true: Allow global "use strict" (also enables 'strict')
"iterator" : false, // true: Tolerate using the `__iterator__` property
"lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
"laxbreak" : false, // true: Tolerate possibly unsafe line breakings
"laxcomma" : false, // true: Tolerate comma-first style coding
"loopfunc" : true, // true: Tolerate functions being defined in loops (DEFAULT:false)
"multistr" : false, // true: Tolerate multi-line strings
"proto" : false, // true: Tolerate using the `__proto__` property
"scripturl" : false, // true: Tolerate script-targeted URLs
"smarttabs" : false, // true: Tolerate mixed tabs/spaces when used for alignment
"shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
"sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
"supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
"validthis" : false, // true: Tolerate using this in a non-constructor function

// Environments
"browser" : true, // Web Browser (window, document, etc)
"couch" : false, // CouchDB
"devel" : true, // Development/debugging (alert, confirm, etc)
"dojo" : false, // Dojo Toolkit
"jquery" : true, // jQuery (DEFAULT:false)
"mootools" : false, // MooTools
"node" : true, // Node.js (DEFAULT:false)
"nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
"prototypejs" : false, // Prototype and Scriptaculous
"rhino" : false, // Rhino
"worker" : false, // Web Workers
"wsh" : false, // Windows Scripting Host
"yui" : false, // Yahoo User Interface

// Legacy
"nomen" : false, // true: Prohibit dangling `_` in variables
"onevar" : false, // true: Allow only one `var` statement per function
"passfail" : false, // true: Stop on first error
"white" : false, // true: Check against strict whitespace and indentation rules

// Custom Globals
// additional predefined global variables
"predef" : [
"process",

// mocha testing
"should",
"describe",
"it",
"beforeEach",
"afterEach",
"before",
"after"
]
}
40 changes: 40 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
ACTIVEMQ_HOME = "/usr/local/Cellar/activemq/5.7.0"

start:;@ \
echo "...starting activemq server..."; \
pushd ${ACTIVEMQ_HOME}; \
bin/activemq start; \
popd; \
echo "----------------------------------------------------------------------------------------------------------"; \
echo "----------------------------------------------------------------------------------------------------------"; \
echo "Started!!!"; \
echo "...http://localhost:8161/admin to manage activemq"; \
echo "----------------------------------------------------------------------------------------------------------"; \
echo "----------------------------------------------------------------------------------------------------------"; \

stop:;@ \
echo "----------------------------------------------------------------------------------------------------------"; \
echo "----------------------------------------------------------------------------------------------------------"; \
echo "...stopping activemq server..."; \
pushd ${ACTIVEMQ_HOME}; \
bin/activemq stop \
popd; \
echo "----------------------------------------------------------------------------------------------------------"; \
echo "----------------------------------------------------------------------------------------------------------"; \
echo "Stopped!!!"; \

testUnit:;@echo "Running unit tests ..."; \
./node_modules/.bin/mocha ./test/*.Unit.Tests.js \
--reporter spec \
--recursive \
--globals "logger,events,buffertools,SlowBuffer, util"

testInt:;@echo "Running integration tests..."; \
./node_modules/.bin/mocha ./test/*.Integration.Tests.js \
--reporter spec \
--recursive \
--timeout 2000 \
--globals "logger"

jsduck:;@echo "Running jsduck to build documentation..."; \
jsduck --config=jsduckConfig.json
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -17,16 +17,39 @@ For documentation see http://benjaminws.github.com/stomp-js/

### Consumer

See examples/stomp-consumer.js
See examples/stomp-examples.js #listener()

### Producer

See examples/stomp-producer.js
See examples/stomp-examples.js #publishMessage()

### Producer with Transaction Support

See examples/stomp-producer-txn.js
See examples/stomp-examples.js #publishMessageWithTransaction()

### App
To run the examples app, open 5 terminal windows.

In each window, navigate to stomp-js folder.
Make sure active mq is running (you can modify the make file start/stop)

In a each window, run one of the following:
node examples/app --file ./stomp-examples.js --debug false -- params ListenerA
node examples/app --file ./stomp-examples.js --debug false -- params ListenerB
node examples/app --file ./stomp-examples.js --debug false -- params ListenerC
node examples/app --file ./stomp-examples.js --debug false -- params ListenerAll
node examples/app --file ./stomp-examples.js --debug false -- params Publisher

Once you run the publisher, you should see the listeners dequeue their messages.
There are 3 A, 2 B, and 1 C message. A and C are topics so Listener All should also get a copy of those, but B is a queue so Listener B should get 1 and Listener All should get 1.
Therefore, you should see the following output:
Listener A should get 3 messages
Listener B should get 1 message
Listener C should get 1 message
Listener All should get 5 messages


### Contributors

rofflwaffls -at- gmail.com
dkhunt27 -at- gmail.com
1 change: 1 addition & 0 deletions docs/app-20ea5717ade2476617d0305b69058533.js

Large diffs are not rendered by default.

Binary file removed docs/bg.png
Binary file not shown.
1 change: 1 addition & 0 deletions docs/data-7123939d7aa281aafe53073d4dfed19f.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions docs/eg-iframe.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Sencha Examples</title>

<script type="text/javascript" src="extjs-build/ext-all.js"></script>
<link rel="stylesheet" type="text/css" href="extjs-build/resources/css/ext-all.css">

<script type="text/javascript">
function loadInlineExample(code, options, callback) {
try {
document.body.innerHTML = '';
eval(code);
callback && callback(true);
} catch (e) {
document.body.innerHTML = e;
callback && callback(false, e);
}
}
</script>
</head>
<body>
</body>
</html>
38 changes: 38 additions & 0 deletions docs/extjs/ext-all.js

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/extjs/resources/themes/images/default/box/l.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Unable to render rich display

Invalid image source.

Binary file added docs/extjs/resources/themes/images/default/box/r.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Unable to render rich display

Invalid image source.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Unable to render rich display

Invalid image source.

Unable to render rich display

Invalid image source.

Unable to render rich display

Invalid image source.

Unable to render rich display

Invalid image source.

Unable to render rich display

Invalid image source.

Unable to render rich display

Invalid image source.

Unable to render rich display

Invalid image source.

Loading
Oops, something went wrong.