I hereby claim:
- I am joeljames on github.
- I am joeljames (https://keybase.io/joeljames) on keybase.
- I have a public key whose fingerprint is F0B4 996B 8EED 7CA5 5512 7740 2449 64A7 1F03 A944
To claim this, I am signing this object:
| @Slf4j | |
| public class KafkaConsumerWithThreads { | |
| private static final AtomicBoolean shutdownRequested = new AtomicBoolean(false); | |
| private static final List<String> topics = List.of("my-topic"); | |
| private static final int noOfWorkerThreads = 3; | |
| public static void main(String[] args) { | |
| ExecutorService service = Executors.newFixedThreadPool(noOfWorkerThreads); | |
| IntStream.range(0, noOfWorkerThreads) | |
| .forEach(i -> service.execute(getRunnableTask())); |
| @Slf4j | |
| public class KafkaProducerApp { | |
| private static final String topic = "my-topic"; | |
| public static void main(String[] args) { | |
| Properties props = new Properties(); | |
| props.put("bootstrap.servers", "localhost:9092,localhost:9093,localhost:9094"); | |
| props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer"); | |
| props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer"); | |
| ## Push to test server | |
| ## Register ## | |
| python setup.py register -r pypitest | |
| ## Upload ## | |
| python setup.py sdist upload -r pypitest | |
| ## Push to main server | |
| ## Register ## | |
| python setup.py register -r pypi | |
| ## Upload ## |
| {% block header %} | |
| <h1>Application Queue Status</h1> | |
| <dl> | |
| {% for name, size in queue_summary.items %} | |
| <dt>Queue Name: {{ name }}</dt> | |
| <dd>Queue Size: {{ size }}</dd> | |
| </br> | |
| {% endfor %} | |
| </dl> |
| from collections import defaultdict | |
| from django.views.generic.base import TemplateResponseMixin, View | |
| from rest_framework import status | |
| from annoying.functions import get_config | |
| from redis import StrictRedis | |
| __all__ = [ |
| # ---------------------------------------------------------------------------- | |
| # Health monitoring | |
| # -------------------------------------------------------- | |
| REDIS_URL = environ.get('REDIS_URL', '') | |
| # Queue Heath Monitoring | |
| # Allowable max queue size to monitor queue health. | |
| ALLOWABLE_MAX_QUEUE_SIZE = int( | |
| environ.get( |
| from django.conf.urls import url | |
| from health.views import StatusQueueView | |
| urlpatterns = [ | |
| url(r'^queue/$', | |
| StatusQueueView.as_view(), | |
| name='status-queue'), | |
| ] |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/sh | |
| #Pre commit hook that prevents code from being commited if tests fails or if code has break points. | |
| # Stash the changes that has not been added | |
| git stash -q --keep-index | |
| echo "Testing....." | |
| python manage.py test | |
| TEST_RESULT=$? |