vue-rabbit-frontend
Paquete de Conexion para interceptar solicitudes Http y generar broadcast de solicitudes por el servicio de rabbitMQ
1,207
| Install | |
|---|---|
npm install vue-rabbit-frontend |
|
| Latest Version: | 0.0.15 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Aug 10, 2023 |
| Links: | npm |
Maintainer: fiscalia_bo
Descripcion
Paquete de Conexion para interceptar solicitudes Http y generar broadcast de solicitudes por el servicio de rabbitMQ
Instalacion
Instalacion del paquete
npm i vue-rabbit-frontend
Variables de Entorno
VITE_BROKER_URL=ws://localhost:15674/ws
VITE_USERNAME=admin
VITE_PASSWORD=password
configuracion de variables de Entorno
import vueRabbitFrontend from 'vue-rabbit-frontend'
const app = createApp(App);
app.use(vueRabbitFrontend, {
VITE_BROKER_URL:import.meta.env.VITE_BROKER_URL;
VITE_USERNAME:import.meta.env.VITE_USERNAME;
VITE_PASSWORD:import.meta.env.VITE_PASSWORD;
});
app.mount('#app');
Configuracion para subcripcion y publicacion
Configuracion de Paquete en el componente
<template>
<div>
<button @click="publish">plugin vue-rabbit-mq</button>
</div>
</template>
import {RabbitMQService} from 'vue-rabbit-frontend'
export default {
name: 'MyComponent',
components: {
},
methods:{
ejecuteMethod(dataResponse){
//metodo a ejecutar con la llegada de datos de rabbimq
},
publish(){
///enviar datos a queue
this.rabbitMQService.publish({ dataSend: '111' });
}
},
async mounted(){
this.rabbitMQService = new RabbitMQService('name_host_virtual', 'name_queue');
this.rabbitMQService.connect()
///escuchar a queue
this.rabbitMQService.subscribe(ejecuteMethod);
}
}
Parametros
| Propiedad | Valor | Descripcion |
|---|---|---|
| virtualHost | String | Host Virtual donde creara una conexion |
| queue | String | Identificador unico de conexion |
| dataSend | JSON Object | Informacion que se desea enviar |
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.0.15 | ^3.3.4 | MIT | |
| 0.0.14 | ^3.3.4 | MIT | |
| 0.0.13 | ^3.3.4 | MIT | |
| 0.0.12 | ^3.3.4 | MIT | |
| 0.0.11 | ^3.3.4 | MIT | |
| 0.0.10 | ^3.3.4 | MIT | |
| 0.0.9 | ^3.3.4 | MIT | |
| 0.0.8 | ^3.3.4 | MIT | |
| 0.0.7 | ^3.3.4 | MIT | |
| 0.0.6 | ^3.3.4 | MIT | |
| 0.0.5 | ^3.3.4 | MIT | |
| 0.0.4 | ^3.3.4 | MIT | |
| 0.0.2 | ^3.2.13 | ||
| 0.0.1 | ^3.2.13 |