From 03d5447098b7d75f48eea9dfdd11ae8f593fbc80 Mon Sep 17 00:00:00 2001
From: 沈斌 <bluelazysb@hotmail.com>
Date: Fri, 27 Oct 2017 13:58:10 +0800
Subject: [PATCH] 数据库更新数据
---
.idea/workspace.xml | 198 +++++++++++++++++++++++++++++++++----------------
src/main/java/com/moral/monitor/listener/TaskListener.java | 6
src/main/resources/rabbitmq.xml | 16 ++-
3 files changed, 147 insertions(+), 73 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index fc22b9e..ef7ebdc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,11 +6,9 @@
</artifacts-to-build>
</component>
<component name="ChangeListManager">
- <list default="true" id="59bc3ffe-0657-438a-9fae-fbbdeee84a24" name="Default" comment="">
+ <list default="true" id="59bc3ffe-0657-438a-9fae-fbbdeee84a24" name="Default" comment="���������������������">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/com/moral/monitor/dao/JobDao.java" afterPath="$PROJECT_DIR$/src/main/java/com/moral/monitor/dao/JobDao.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java" afterPath="$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/resources/mapper/JobDao.xml" afterPath="$PROJECT_DIR$/src/main/resources/mapper/JobDao.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/resources/rabbitmq.xml" afterPath="$PROJECT_DIR$/src/main/resources/rabbitmq.xml" />
</list>
<ignored path="$PROJECT_DIR$/out/" />
@@ -23,7 +21,30 @@
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileEditorManager">
- <leaf SIDE_TABS_SIZE_LIMIT_KEY="300" />
+ <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
+ <file leaf-file-name="TaskListener.java" pinned="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="-6">
+ <caret line="45" column="9" lean-forward="true" selection-start-line="45" selection-start-column="9" selection-end-line="45" selection-end-column="9" />
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="rabbitmq.xml" pinned="false" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/src/main/resources/rabbitmq.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="419">
+ <caret line="41" column="47" lean-forward="false" selection-start-line="41" selection-start-column="34" selection-end-line="41" selection-end-column="47" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ </leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
@@ -79,9 +100,9 @@
<option value="$PROJECT_DIR$/pom.xml" />
<option value="$PROJECT_DIR$/src/main/java/com/moral/monitor/Test.java" />
<option value="$PROJECT_DIR$/src/test/java/Test.java" />
- <option value="$PROJECT_DIR$/src/main/resources/rabbitmq.xml" />
<option value="$PROJECT_DIR$/src/main/resources/mapper/JobDao.xml" />
<option value="$PROJECT_DIR$/src/main/java/com/moral/monitor/dao/JobDao.java" />
+ <option value="$PROJECT_DIR$/src/main/resources/rabbitmq.xml" />
<option value="$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java" />
</list>
</option>
@@ -100,7 +121,8 @@
<option name="CUSTOM_FILTER" />
</component>
<component name="ProjectFrameBounds">
- <option name="y" value="23" />
+ <option name="x" value="-1546" />
+ <option name="y" value="55" />
<option name="width" value="1404" />
<option name="height" value="877" />
</component>
@@ -160,7 +182,7 @@
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="monitor" type="462c0819:PsiDirectoryNode" />
- <item name="dao" type="462c0819:PsiDirectoryNode" />
+ <item name="listener" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="task" type="b2602c69:ProjectViewProjectNode" />
@@ -168,14 +190,6 @@
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="resources" type="462c0819:PsiDirectoryNode" />
- </path>
- <path>
- <item name="task" type="b2602c69:ProjectViewProjectNode" />
- <item name="task" type="462c0819:PsiDirectoryNode" />
- <item name="src" type="462c0819:PsiDirectoryNode" />
- <item name="main" type="462c0819:PsiDirectoryNode" />
- <item name="resources" type="462c0819:PsiDirectoryNode" />
- <item name="mapper" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
@@ -191,6 +205,9 @@
<property name="nodejs_interpreter_path" value="/usr/local/bin/node" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
+ <property name="project.structure.last.edited" value="Modules" />
+ <property name="project.structure.proportion" value="0.0" />
+ <property name="project.structure.side.proportion" value="0.0" />
</component>
<component name="RecentsManager">
<key name="CopyClassDialog.RECENTS_KEY">
@@ -415,7 +432,7 @@
<workItem from="1509026048007" duration="2710000" />
<workItem from="1509030446574" duration="3006000" />
<workItem from="1509056858319" duration="2984000" />
- <workItem from="1509068025499" duration="2239000" />
+ <workItem from="1509068025499" duration="7858000" />
</task>
<task id="LOCAL-00001" summary="updates">
<created>1508484578874</created>
@@ -536,14 +553,21 @@
<option name="project" value="LOCAL" />
<updated>1509061963500</updated>
</task>
- <option name="localTasksCounter" value="18" />
+ <task id="LOCAL-00018" summary="���������������������">
+ <created>1509071255017</created>
+ <option name="number" value="00018" />
+ <option name="presentableId" value="LOCAL-00018" />
+ <option name="project" value="LOCAL" />
+ <updated>1509071255017</updated>
+ </task>
+ <option name="localTasksCounter" value="19" />
<servers />
</component>
<component name="TimeTrackingManager">
- <option name="totallyTimeSpent" value="55303000" />
+ <option name="totallyTimeSpent" value="60922000" />
</component>
<component name="ToolWindowManager">
- <frame x="0" y="23" width="1404" height="877" extended-state="0" />
+ <frame x="-1546" y="55" width="1404" height="877" extended-state="0" />
<layout>
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.68414325" sideWeight="0.5117474" order="8" side_tool="true" content_ui="tabs" />
@@ -563,10 +587,10 @@
<window_info id="Java Enterprise" 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="13" side_tool="false" content_ui="tabs" />
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<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.32992327" sideWeight="0.48237884" order="10" 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.63682866" sideWeight="0.48825258" order="3" side_tool="false" content_ui="tabs" />
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.7378517" sideWeight="0.48825258" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Spring" 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="11" 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="12" side_tool="false" content_ui="tabs" />
- <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24816446" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
+ <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.20117474" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Web" 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="5" side_tool="true" content_ui="tabs" />
<window_info id="Theme Preview" active="false" anchor="right" 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="6" side_tool="true" content_ui="tabs" />
@@ -577,39 +601,6 @@
<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="7" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32992327" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
</layout>
- <layout-to-restore>
- <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" 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="6" side_tool="false" content_ui="tabs" />
- <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="2" side_tool="false" content_ui="tabs" />
- <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
- <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.68414325" sideWeight="0.5117474" order="8" side_tool="true" content_ui="tabs" />
- <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32893288" sideWeight="0.49706313" order="0" side_tool="false" content_ui="tabs" />
- <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
- <window_info id="Capture Tool" 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="false" content_ui="tabs" />
- <window_info id="Designer" 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="3" 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="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" 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="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="UI Designer" 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="4" 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.39897698" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
- <window_info id="TODO" 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="9" side_tool="false" content_ui="tabs" />
- <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32992327" sideWeight="0.49706313" order="1" side_tool="false" content_ui="tabs" />
- <window_info id="Palette	" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
- <window_info id="Image Layers" 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="7" side_tool="false" content_ui="tabs" />
- <window_info id="Java Enterprise" 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="13" side_tool="false" content_ui="tabs" />
- <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" 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="7" side_tool="false" content_ui="tabs" />
- <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.32992327" sideWeight="0.48237884" order="10" side_tool="false" content_ui="tabs" />
- <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.63682866" sideWeight="0.48825258" order="3" side_tool="false" content_ui="tabs" />
- <window_info id="Spring" 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="11" 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="12" side_tool="false" content_ui="tabs" />
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24816446" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
- <window_info id="Web" 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="5" side_tool="true" content_ui="tabs" />
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32992327" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
- <window_info id="Theme Preview" active="false" anchor="right" 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="6" side_tool="true" content_ui="tabs" />
- </layout-to-restore>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
@@ -661,7 +652,9 @@
<MESSAGE value="updates" />
<MESSAGE value="������������" />
<MESSAGE value="RabbitMQ & Redis ������" />
- <option name="LAST_COMMIT_MESSAGE" value="RabbitMQ & Redis ������" />
+ <MESSAGE value="������������" />
+ <MESSAGE value="���������������������" />
+ <option name="LAST_COMMIT_MESSAGE" value="���������������������" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
@@ -983,14 +976,6 @@
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/resources/rabbitmq.xml">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="627">
- <caret line="52" column="27" lean-forward="false" selection-start-line="52" selection-start-column="19" selection-end-line="52" selection-end-column="27" />
- <folding />
- </state>
- </provider>
- </entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/dao/JobDao.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
@@ -1032,17 +1017,88 @@
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java">
<provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="631">
- <caret line="74" column="0" lean-forward="true" selection-start-line="74" selection-start-column="0" selection-end-line="74" selection-end-column="0" />
+ <state relative-caret-position="-6">
+ <caret line="45" column="9" lean-forward="true" selection-start-line="45" selection-start-column="9" selection-end-line="45" selection-end-column="9" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
+ <entry file="file://$PROJECT_DIR$/src/main/resources/rabbitmq.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="419">
+ <caret line="41" column="47" lean-forward="false" selection-start-line="41" selection-start-column="34" selection-end-line="41" selection-end-column="47" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
</component>
<component name="masterDetails">
<states>
+ <state key="ArtifactsStructureConfigurable.UI">
+ <settings>
+ <artifact-editor />
+ <last-edited>task:war</last-edited>
+ <splitter-proportions>
+ <option name="proportions">
+ <list>
+ <option value="0.2" />
+ <option value="0.5" />
+ </list>
+ </option>
+ </splitter-proportions>
+ </settings>
+ </state>
+ <state key="FacetStructureConfigurable.UI">
+ <settings>
+ <last-edited>Spring</last-edited>
+ <splitter-proportions>
+ <option name="proportions">
+ <list>
+ <option value="0.2" />
+ </list>
+ </option>
+ </splitter-proportions>
+ </settings>
+ </state>
+ <state key="GlobalLibrariesConfigurable.UI">
+ <settings>
+ <last-edited>scala-sdk-2.11.8</last-edited>
+ <splitter-proportions>
+ <option name="proportions">
+ <list>
+ <option value="0.2" />
+ </list>
+ </option>
+ </splitter-proportions>
+ </settings>
+ </state>
+ <state key="JdkListConfigurable.UI">
+ <settings>
+ <last-edited>1.8</last-edited>
+ <splitter-proportions>
+ <option name="proportions">
+ <list>
+ <option value="0.2" />
+ </list>
+ </option>
+ </splitter-proportions>
+ </settings>
+ </state>
+ <state key="ModuleStructureConfigurable.UI">
+ <settings>
+ <last-edited>task</last-edited>
+ <splitter-proportions>
+ <option name="proportions">
+ <list>
+ <option value="0.17633136" />
+ <option value="0.6" />
+ </list>
+ </option>
+ </splitter-proportions>
+ </settings>
+ </state>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>1.8</last-edited>
@@ -1055,6 +1111,18 @@
</splitter-proportions>
</settings>
</state>
+ <state key="ProjectLibrariesConfigurable.UI">
+ <settings>
+ <last-edited>lib</last-edited>
+ <splitter-proportions>
+ <option name="proportions">
+ <list>
+ <option value="0.2" />
+ </list>
+ </option>
+ </splitter-proportions>
+ </settings>
+ </state>
</states>
</component>
</project>
\ No newline at end of file
diff --git a/src/main/java/com/moral/monitor/listener/TaskListener.java b/src/main/java/com/moral/monitor/listener/TaskListener.java
index 8e78afb..a600c9c 100644
--- a/src/main/java/com/moral/monitor/listener/TaskListener.java
+++ b/src/main/java/com/moral/monitor/listener/TaskListener.java
@@ -67,10 +67,10 @@
}
}
- System.out.println(message);
- System.out.println(JSON.toJSONString(msgData));
+// System.out.println(message);
+// System.out.println(JSON.toJSONString(msgData));
- rabbitTemplate.convertAndSend("monitors_data_2", "", JSON.toJSONString(msgData).getBytes());
+ rabbitTemplate.convertAndSend("monitors_data", "", JSON.toJSONString(msgData).getBytes());
// rabbitTemplate.send("monitors_data_3", "", new Message(JSON.toJSONString(msgData).getBytes(), new MessageProperties()));
int state = (new Random()).nextInt(4) % 5;
diff --git a/src/main/resources/rabbitmq.xml b/src/main/resources/rabbitmq.xml
index 5335899..6279b11 100644
--- a/src/main/resources/rabbitmq.xml
+++ b/src/main/resources/rabbitmq.xml
@@ -21,21 +21,27 @@
<constructor-arg ref="rabbitConnectionFactory"></constructor-arg>
</bean>
- <rabbit:queue name="monitors_storage_data" durable="false" exclusive="false" auto-delete="true"/>
+ <rabbit:queue name="devices_storage_data" durable="true" exclusive="false" auto-delete="false"/>
+
+ <rabbit:fanout-exchange name="devices_data" durable="true" auto-delete="false">
+ <rabbit:bindings>
+ <rabbit:binding queue="devices_storage_data"></rabbit:binding>
+ </rabbit:bindings>
+ </rabbit:fanout-exchange>
<!--<bean id="amqpMsgListener" class="com.moral.monitor.listener.MonitorListener"/>-->
<!--<bean id="amqpMsgListener" class="com.moral.monitor.listener.Listener"/>-->
<bean id="amqpMsgListener" class="com.moral.monitor.listener.TaskListener"/>
<rabbit:listener-container connection-factory="rabbitConnectionFactory" acknowledge="auto" >
- <rabbit:listener queues="monitors_storage_data" ref="amqpMsgListener" />
+ <rabbit:listener queues="devices_storage_data" ref="amqpMsgListener" />
</rabbit:listener-container>
- <rabbit:queue name="monitors_storage_data_2" durable="true" auto-delete="false" exclusive="false" />
+ <rabbit:queue name="monitors_storage_data" durable="false" auto-delete="true" exclusive="false" />
- <rabbit:fanout-exchange name="monitors_data_2" durable="true" auto-delete="false">
+ <rabbit:fanout-exchange name="monitors_data" durable="false" auto-delete="true">
<rabbit:bindings>
- <rabbit:binding queue="monitors_storage_data_2"></rabbit:binding>
+ <rabbit:binding queue="monitors_storage_data"></rabbit:binding>
</rabbit:bindings>
</rabbit:fanout-exchange>
--
Gitblit v1.8.0