diff --git a/coolamqp/attaches/consumer.py b/coolamqp/attaches/consumer.py
index 98da3c0..32085bd 100644
--- a/coolamqp/attaches/consumer.py
+++ b/coolamqp/attaches/consumer.py
@@ -87,8 +87,10 @@ class Consumer(Channeler):
         :param on_message: callable that will process incoming messages
         :type on_message: callable(ReceivedMessage instance)
         :param no_ack: Will this consumer require acknowledges from messages?
-        :param qos: a tuple of (prefetch size, prefetch window) for this consumer
-        :type qos: tuple(int, int) or tuple(None, int)
+        :param qos: a tuple of (prefetch size, prefetch window) for this consumer, or an int (prefetch window only)
+            If an int is passed, prefetch size will be set to 0 (which means undefined), and this int
+            will be used for prefetch window
+        :type qos: tuple(int, int) or tuple(None, int) or int
         :param cancel_on_failure: Consumer will cancel itself when link goes down
         :type cancel_on_failure: bool
         :param future_to_notify: Future to succeed when this consumer goes online for the first time.
@@ -119,7 +121,9 @@ class Consumer(Channeler):
         # if this is not None, then it has an attribute
         # on_cancel_customer(Consumer instance)
         if qos is not None:
-            if qos[0] is None:
+            if isinstance(qos, int):
+                qos = 0, qos
+            elif qos[0] is None:
                 qos = 0, qos[1]  # prefetch_size=0=undefined
         self.qos = qos
         self.qos_update_sent = False  # QoS was not sent to server

Support passing qos as int
it should be understood as None, int then.
diff --git a/tests/test_attaches/__init__.py b/tests/test_attaches/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/test_attaches/test_consumer.py b/tests/test_attaches/test_consumer.py
new file mode 100644
index 0000000..3ddf662
--- /dev/null
+++ b/tests/test_attaches/test_consumer.py
@@ -0,0 +1,13 @@
+# coding=UTF-8
+from __future__ import print_function, absolute_import, division
+import six
+import unittest
+from coolamqp.attaches import Consumer
+from coolamqp.objects import Queue
+
+
+class TestConsumer(unittest.TestCase):
+    def test_issue_26(self):
+        """Support for passing qos as int"""
+        cons = Consumer(Queue('wtf'), lambda msg: None, qos=25)
+        self.assertEquals(cons.qos, (0, 25))

pip install -e .[dev]
parse_log_pytest
requirements.txt
nose coverage pytest
apt-get update apt-get install -y gcc rabbitmq-server
3.5
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
certifi==2021.5.30
-e git+https://github.com/smok-serwis/coolamqp.git@1b7c1619d9a65eabc4bb2502b098930e3d48a959#egg=CoolAMQP
coverage==6.2
futures==2.2.0
importlib-metadata==4.8.3
iniconfig==1.1.1
monotonic==1.6
nose==1.3.7
packaging==21.3
pluggy==1.0.0
py==1.11.0
pyparsing==3.1.4
pytest==7.0.1
six==1.17.0
tomli==1.2.3
typing_extensions==4.1.1
zipp==3.6.0

name: coolamqp
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - coverage==6.2
      - futures==2.2.0
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - monotonic==1.6
      - nose==1.3.7
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - six==1.17.0
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - zipp==3.6.0
prefix: /opt/conda/envs/coolamqp

tests/test_attaches/test_consumer.py::TestConsumer::test_issue_26
coolamqp/attaches/consumer.py
coolamqp/attaches/consumer.py