Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

redis-ccp-queue

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis-ccp-queue - npm Package Compare versions

Comparing version
1.0.0
to
1.0.1
+14
.idea/libraries/redis_ccp_queue_node_modules.xml
<component name="libraryTable">
<library name="redis-ccp-queue node_modules" type="javaScript">
<properties>
<option name="frameworkName" value="node_modules" />
<sourceFilesUrls>
<item url="file://$PROJECT_DIR$/node_modules" />
</sourceFilesUrls>
</properties>
<CLASSES>
<root url="file://$PROJECT_DIR$/node_modules" />
</CLASSES>
<SOURCES />
</library>
</component>
+1
-0
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<file url="file://$PROJECT_DIR$" libraries="{redis-ccp-queue node_modules}" />
<includedPredefinedLibrary name="ECMAScript 6" />

@@ -5,0 +6,0 @@ <includedPredefinedLibrary name="Node.js Core" />

+69
-23

@@ -5,10 +5,4 @@ <?xml version="1.0" encoding="UTF-8"?>

<list default="true" id="08ed19e2-7aa9-4d8b-9af0-3f93f40c3f02" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.gitignore" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.npmignore" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/LICENSE" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/README.md" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/examples/consumer.js" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/examples/producer.js" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/index.js" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/package.json" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/package.json" afterPath="$PROJECT_DIR$/package.json" />
</list>

@@ -34,7 +28,7 @@ <ignored path="redis-ccpq.iws" />

<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="package.json" pinned="false" current-in-tab="false">
<file leaf-file-name="package.json" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-7.1923075">
<caret line="11" column="0" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
<state vertical-scroll-proportion="0.36457506">
<caret line="27" column="0" selection-start-line="27" selection-start-column="0" selection-end-line="27" selection-end-column="0" />
<folding />

@@ -45,3 +39,3 @@ </state>

</file>
<file leaf-file-name="README.md" pinned="false" current-in-tab="true">
<file leaf-file-name="README.md" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/README.md">

@@ -52,4 +46,4 @@ <provider editor-type-id="MarkdownPreviewEditor">

<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<state vertical-scroll-proportion="-42.86207">
<caret line="106" column="0" selection-start-line="106" selection-start-column="0" selection-end-line="106" selection-end-column="0" />
<folding />

@@ -91,4 +85,4 @@ </state>

<option value="$PROJECT_DIR$/examples/producer.js" />
<option value="$PROJECT_DIR$/README.md" />
<option value="$PROJECT_DIR$/package.json" />
<option value="$PROJECT_DIR$/README.md" />
</list>

@@ -268,7 +262,5 @@ </option>

<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />

@@ -278,5 +270,7 @@ <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />

<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
</layout>

@@ -322,3 +316,3 @@ <layout-to-restore>

<state vertical-scroll-proportion="0.0">
<caret line="21" column="0" selection-start-line="21" selection-start-column="0" selection-end-line="21" selection-end-column="0" />
<caret line="11" column="0" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
<folding />

@@ -339,5 +333,13 @@ </state>

</entry>
<entry file="file://$PROJECT_DIR$/lib/index.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="57" column="0" selection-start-line="57" selection-start-column="0" selection-end-line="57" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-7.1923075">
<state vertical-scroll-proportion="0.0">
<caret line="11" column="0" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />

@@ -348,2 +350,40 @@ <folding />

</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider editor-type-id="MarkdownPreviewEditor">
<state />
</provider>
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/index.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="57" column="0" selection-start-line="57" selection-start-column="0" selection-end-line="57" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="21" column="0" selection-start-line="21" selection-start-column="0" selection-end-line="21" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider editor-type-id="MarkdownPreviewEditor">
<state />
</provider>
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/consumer.js">

@@ -353,3 +393,2 @@ <provider selected="true" editor-type-id="text-editor">

<caret line="4" column="24" selection-start-line="4" selection-start-column="24" selection-end-line="4" selection-end-column="24" />
<folding />
</state>

@@ -362,3 +401,2 @@ </provider>

<caret line="2" column="0" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
<folding />
</state>

@@ -380,4 +418,4 @@ </provider>

<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<state vertical-scroll-proportion="-42.86207">
<caret line="106" column="0" selection-start-line="106" selection-start-column="0" selection-end-line="106" selection-end-column="0" />
<folding />

@@ -387,3 +425,11 @@ </state>

</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.36457506">
<caret line="27" column="0" selection-start-line="27" selection-start-column="0" selection-end-line="27" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</component>
</project>
{
"name": "redis-ccp-queue",
"version": "1.0.0",
"version": "1.0.1",
"description": "A simple and lightweight Competing Consumers Pattern Queue",

@@ -28,6 +28,4 @@ "license": "MIT",

"dependencies": {
"eyes": "^0.1.8",
"inspect": "0.0.2",
"ioredis": "^1.15.1"
}
}
+16
-16

@@ -52,3 +52,3 @@ # redis-ccp-queue

function handleMessage(data, done) {
console.log('CONSUMER ' + id + ':');
console.log('CONSUMER:');
console.log(data);

@@ -112,17 +112,17 @@ done(); // call done() when message is handled

-------------- --------------
| Producer 2 | ---> ---> | Consumer 1 |
-------------- --------------
-------------- --------------
| Producer 2 | ---> ---> | Consumer 1 |
-------------- --------------
-------------- ------------------------------------- --------------
| Producer 3 | ---> | ------ ------ ------ ------ | ---> | Consumer 2 |
-------------- | | M5 | | M4 | | M3 | ....> | M1 | | --------------
| ------ ------ ------ ------ |
. ------------------------------------- .
. Message Queue (FIFO) .
. .
-------------- ------------------------------------- --------------
| Producer 3 | ---> | ------ ------ ------ ------ | ---> | Consumer 2 |
-------------- | | M5 | | M4 | | M3 | ....> | M1 | | --------------
| ------ ------ ------ ------ |
. ------------------------------------- .
. Message Queue (FIFO) .
. .
-------------- --------------
| Producer x | ---> ---> | Consumer n |
-------------- --------------
-------------- --------------
| Producer x | ---> ---> | Consumer n |
-------------- --------------

@@ -148,3 +148,3 @@ --------------

| -------------- | ------- |
| new ccpq.Producer(queueName [, options]) | expects an Queue-Name and (optional) Redis Options *) |
| new ccpq.Producer(queueName [, options]) | expects an queue name and (optional) Redis Options *) |
| push(data) | push data to the queue. This can be either a string or an JSON object |

@@ -157,3 +157,3 @@ | shutdown() | disconnects safely from Redis |

| -------------- | ------- |
| new ccpq.Consumer(queueName, callback [, options]) | expects an Queue-Name, your callback function (where you handle/consume the data from the queue) and (optional) Redis Options *) |
| new ccpq.Consumer(queueName, callback [, options]) | expects a queue name, your callback function (where you handle/consume the data from the queue) and (optional) Redis Options *) |
| shutdown() | disconnects safely from Redis |

@@ -160,0 +160,0 @@

Sorry, the diff of this file is not supported yet